SuperAPI AI 工具集

wp-plugin-review

通用与其它

查看项目

更新于 10-16 08:09

技能介绍

用途:对 WordPress 插件做全面审查,覆盖安全性、WPCS 合规、插件仓库指南、单元测试与无障碍性,最终输出结构化 Markdown 报告。

主要能力:分两阶段。自动化分析:运行 PHPCS(WordPress/WordPress-Extra 标准)、PHPStan(level 5)、PHPUnit。人工审查:按安全、编码规范、仓库指南、单元测试覆盖、无障碍性五类逐项检查,如输入清理、输出转义、$wpdb->prepare()、nonce、current_user_can()、ABSPATH 防护、wp_enqueue_*、国际化、readme.txt、GPL 许可、ARIA、键盘可访问性、颜色对比等。

使用方式:先运行 bash scripts/setup_tools.sh 安装工具;将插件放在 /mnt/user-data/uploads/,解压或复制到 /home/claude/plugin-under-review/;依次执行示例命令:phpcs --standard=WordPress --extensions=php --report=json /home/claude/plugin-under-review/ > /home/claude/phpcs-report.json 2>&1、phpstan analyse --level=5 --no-progress /home/claude/plugin-under-review/、phpunit。人工审查前须先读 references/security-checklist.md 与 references/repo-guidelines-checklist.md,并按 references/report-template.md 生成报告,保存到 /mnt/user-data/outputs/[plugin-name]-review-report.md。

限制:若插件无测试目录或 phpunit.xml,PHPUnit 无法运行,需在报告中记为发现项;其余具体依赖与平台要求资料中未展开。