前言介紹
- 這款 WordPress 外掛「Eli's PHP Compatibility Scanner」是 2025-10-10 上架。
- 目前有 50 個安裝啟用數。
- 上一次更新是 2026-02-01,距離現在已有 24 天。
- 外掛最低要求 WordPress 4.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 1 人給過評分。
- 論壇上目前有 1 個提問,問題解答率 100% ,不低,算是個很有心解決問題的開發者團隊了!
外掛協作開發者
外掛標籤
phpcs | testing | code quality | compatibility | wordpress development |
內容簡介
總結:
這個外掛是專為開發環境(如 LocalWP、XAMPP 或自託伺服器)開發的,無法在大多數托管服務提供商(如 WP Engine、Kinsta、SiteGround 等)上運作,因為安全限制禁用了 exec() 函數並限制對 PHP 二進制文件的訪問。
問題與答案:
1. 這個外掛是為哪些環境設計的?
- 答:這個外掛是為開發環境(如 LocalWP、XAMPP 或自託伺服器)設計的。
2. 這個外掛使用什麼工具來分析 PHP 代碼?
- 答:這個外掛使用 PHP_CodeSniffer 與 PHPCompatibility 標準來執行深層靜態分析。
3. 使用者如何開始使用這個外掛?
- 答:使用者可以前往「工具 → PHP Compatibility Scanner」,確認系統兼容性,選擇要掃描的插件和/或主題,配置掃描選項,然後點擊「Start Scan」開始進行兼容性檢查。
4. 那些為什麼會造成此外掛無法在某些環境中運行?
- 答:由於 managed hosting 提供商禁用了 exec() 函數並限制對 PHP 二進制文件的訪問,這個外掛無法在這些環境中運行。
5. 有哪些被支持的環境?
- 答:被支持的環境包括 LocalWP、XAMPP/MAMP、Docker WordPress 設置、自託 VPS/專用伺服器以及開發環境具有 shell 訪問權限。
6. 如何來貢獻這個外掛?
- 答:貢獻者可以貢獻額外的 PHP 版本兼容性規則、性能優化、UI/UX 改進以及托管環境兼容性解決方案。
原文外掛簡介
⚠️ Important: Development Environment Only
This plugin is designed for development environments like LocalWP, XAMPP, or self-hosted servers. It will not work on most managed hosting providers (WP Engine, Kinsta, SiteGround, etc.) due to security restrictions that disable the exec() function and limit access to PHP binaries.
How It Works
This plugin leverages PHP_CodeSniffer with the PHPCompatibility standard to perform deep static analysis of your PHP code.
Core Components:
Bundled Dependencies: Includes PHP_CodeSniffer and PHPCompatibility ruleset
Batch Processing: Scans files in configurable batches (10-100 files) to manage memory usage
Command Execution: Executes PHPCS via PHP’s exec() function with specific parameters
Server-Side State: Stores file lists in WordPress options to optimize AJAX requests
Progressive UI: Real-time batch results with stop/start controls
How to Use:
Navigate to Tools → PHP Compatibility Scanner
Review the System Check section to ensure your environment is compatible
Select the plugins and/or themes you want to scan by checking their boxes
Configure your scan options:
Target PHP Version: Choose the PHP version you want to test against (7.4 – 8.4)
Batch Size: Select how many files to process at once (default: 50 files)
Skip Vendor Directory: Keep checked to skip third-party dependencies
Click Start Scan to begin the compatibility check
View results in real-time as each plugin/theme is scanned
Review any errors (❌) or warnings (⚠️) found in your code
Click on any target to expand and see detailed compatibility issues
Why It Requires Development Environments
exec() Function: Required to run PHPCS binary – disabled on managed hosts
PHP Binary Access: Needs access to PHP executable – restricted on shared hosting
Composer Dependencies: Requires vendor directory with PHPCS installation
File System Access: Creates temporary files for batch processing
Memory/Time Limits: Long-running scans need relaxed execution limits
Supported Environments
LocalWP (recommended)
XAMPP/MAMP
Docker WordPress setups
Self-hosted VPS/dedicated servers
Development environments with shell access
Unsupported Environments
WP Engine (exec() disabled)
Kinsta (security restrictions)
SiteGround (managed hosting limitations)
GoDaddy Managed WordPress (function restrictions)
WordPress.com (no plugin uploads)
Most shared hosting providers
Contributing
This plugin is actively developed for WordPress development environments. Contributions are welcome, especially:
Additional PHP version compatibility rules
Performance optimizations
UI/UX improvements
Hosted environment compatibility solutions
Technical Details
Dependencies
PHP_CodeSniffer: ^3.13 (static analysis engine)
PHPCompatibility: dev-develop (compatibility ruleset)
License
GPLv2 or later – same as WordPress core.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Eli's PHP Compatibility Scanner」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
The Code Registry – Code Backup & Intelligence 》總結:, 「The Code Registry - Code Backup & Intelligence」外掛將您的WordPress站點連接到我們的代碼智能和分析服務,安全地複製您的站點代碼進行分析...。
