openwpsecurity/core
Composer 安装命令:
composer require openwpsecurity/core
包简介
Shared HTTP, database, admin, and security infrastructure for OpenWPSecurity plugins.
README 文档
README
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-diactoroslaminas/laminas-httphandlerrunnerpsr/http-messagepsr/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.
- GitHub Sponsors: https://github.com/sponsors/victorwitkamp
openwpsecurity/core 适用场景与选型建议
openwpsecurity/core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 59 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「wordpress-plugin」 「psr-7」 「openwpsecurity」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 openwpsecurity/core 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 openwpsecurity/core 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 openwpsecurity/core 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Model of a web-based resource
Interfaces for web resource models and services to retrieve and create them
Interface for a factory to create Psr\Http\Message\StreamInterface objects
A PSR-7 compatible library for making CRUD API endpoints
Retrieve a WebResourceInterface instance over HTTP
Implementation of webignition/stream-factory-interface
统计信息
- 总下载量: 59
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-05-26
