Shared HTTP, database, admin, and security infrastructure for OpenWPSecurity plugins.

Maintainers

Package info

github.com/victorwitkamp/openwpsecurity-core

pkg:composer/openwpsecurity/core

Transparency log

Fund package maintenance!

victorwitkamp

Statistics

Installs: 88

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.6.0 2026-07-11 23:04 UTC

This package is auto-updated.

Last update: 2026-07-11 23:06:22 UTC


README

OpenWPSecurity

CI Packagist License

Composer package: openwpsecurity/core

OpenWPSecurity Core contains shared PHP infrastructure used by OpenWPSecurity WordPress plugins. It does not define WordPress plugin tables, options, admin pages, or activation hooks.

Requirements

  • PHP 8.2 or newer
  • Composer 2
  • WordPress runtime for WordPress adapter classes

Install

composer require openwpsecurity/core:^0.6

API Surface

VictorWitkamp\OpenWPSecurity\Core\Http\IpAddressInspector

Resolves trusted IP headers and normalizes IPv4 and IPv6 candidates.

VictorWitkamp\OpenWPSecurity\Core\Http\WordPressServerRequestFactory

Creates a PSR-7 ServerRequestInterface from the active WordPress request using laminas/laminas-diactoros.

VictorWitkamp\OpenWPSecurity\Core\Http\Response\ResponseDispatcher

Emits HTML, JSON, text, and redirect responses using PSR-7 response factories and laminas/laminas-httphandlerrunner.

VictorWitkamp\OpenWPSecurity\Core\Configuration\SettingsInputSanitizer

Normalizes line-based settings, trusted IP header lists, and IP address lists.

VictorWitkamp\OpenWPSecurity\Core\Location\GeoIpLookup

Classifies local/private IP addresses and resolves country metadata through the PHP GeoIP extension or optional remote lookup.

VictorWitkamp\OpenWPSecurity\Core\View\Reporting\ReportPeriod

Maps supported report periods to labels and durations.

VictorWitkamp\OpenWPSecurity\Core\View\Pagination\AdminPaginator

Builds WordPress admin pagination links for report tables.

VictorWitkamp\OpenWPSecurity\Core\View\Presentation\CountryDistributionPanel

Renders the shared country distribution panel used by OpenWPSecurity report pages.

VictorWitkamp\OpenWPSecurity\Core\Security\Ban\TemporaryBanRepository

Defines the shared active temporary-ban repository contract.

VictorWitkamp\OpenWPSecurity\Core\Security\Ban\AbstractTemporaryBanRepository

Provides indexed table storage, upserts, expiry cleanup, and WordPress object caching for plugin-owned temporary-ban repositories.

VictorWitkamp\OpenWPSecurity\Core\Security\Ban\AbstractTemporaryBanCounterRepository

Provides atomic per-IP temporary-ban recurrence counters for plugin-owned tables.

VictorWitkamp\OpenWPSecurity\Core\Security\Ban\AbstractPermanentBanRepository

Provides indexed table storage, duplicate/private-IP protection, paginated reads, counts, and deletion for plugin-owned permanent-ban repositories.

VictorWitkamp\OpenWPSecurity\Core\Security\Ban\TemporaryBanCleanup

Schedules daily removal of expired temporary-ban rows.

Runtime Dependencies

  • laminas/laminas-diactoros
  • laminas/laminas-httphandlerrunner
  • psr/http-message
  • psr/http-factory

The WordPress adapter classes expect WordPress runtime functions such as get_option() and wp_json_encode() to be available.

Development

Run composer install, then use composer check for WordPress Coding Standards, PHPStan static analysis, and PHPUnit. The repository recommends the VS Code PHP Sniffer & Beautifier and PHPStan extensions, which validate PHP files during development.

Support

OpenWPSecurity Core is maintained as open-source software. Funding helps cover maintenance, testing, documentation, and continued development.