tuhin18003/wp-compat-tester 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tuhin18003/wp-compat-tester

最新稳定版本:v1.0.0

Composer 安装命令:

composer require tuhin18003/wp-compat-tester

包简介

A CLI tool to scan WordPress plugins for compatibility with the latest WordPress versions.

README 文档

README

A CLI tool to scan your WordPress plugin code for compatibility issues with the latest WordPress version.

Features

  • Detects your local WordPress version
  • Fetches the latest WordPress version from wordpress.org
  • Scans plugin PHP files for deprecated functions (based on official GitHub source)
  • Warns about improper usage of plugins_loaded for translations in WP 6.7+

Installation (in your plugin project)

Inside your plugin project folder:

composer require --dev tuhin18003/wp-compat-tester

Usage

Option 1: Manually

Run the CLI tool directly:

vendor/bin/wp-check.php -- ./my-plugin-folder

Or scan multiple paths:

vendor/bin/wp-check.php -- ./my-plugin.php ./core

Option 2: Add to composer scripts

In your plugin project's composer.json:

"scripts": {
  "check:compat": "vendor/bin/wp-check.php -- ./my-plugin.php ./core"
}

Then run:

composer run check:compat

Output Example

🔍 Scanning plugin at: ./my-plugin.php
Local WP Version:  6.7.0
Latest WP Version: 6.7.2

⚠️  Deprecated function `get_page_by_title()` found in plugin.php (deprecated since WP 6.2.0)
⚠️  Detected 'plugins_loaded' hook usage in plugin.php. Use 'init' instead for translations in WP >= 6.7.
✅ Scan complete.

License

MIT

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-30