wp-test-analyzer
分析 WordPress 主题以进行 E2E 测试生成
WordPress 开发人员难以识别主题中所有可测试的元素以进行全面的 E2E 测试。此技能会自动扫描 PHP 和 JavaScript 文件,提取表单、导航菜单、动态内容和交互,生成用于 Playwright 的结构化测试数据。
Descargar el ZIP de la skill
Subir en Claude
Ve a Configuración → Capacidades → Skills → Subir skill
Activa y empieza a usar
Pruébalo
Usando "wp-test-analyzer". Analyze the theme at /path/to/contact-theme for testable elements
Resultado esperado:
Analysis complete. Found 1 contact form with 3 required fields (first_name, email, message), nonce field csr_contact_nonce, and success redirect to ?contact=success. Identified 4 navigation menu items and 2 JavaScript animations (initHomePage, fadeInElements).
Usando "wp-test-analyzer". What forms exist in this WordPress theme?
Resultado esperado:
- Contact Form in page-contact.php: POST method, fields [first_name (text), email (email), message (textarea)], nonce: csr_contact_nonce
- Newsletter Signup in footer.php: POST method, fields [subscriber_email (email)], success redirect: ?newsletter=subscribed
Usando "wp-test-analyzer". Generate a markdown report of all testable elements in my theme
Resultado esperado:
WordPress Theme Analysis Report generated with 5 sections: Forms (2 found), Page Templates (8 found), Links (24 found), Custom Post Types (1 property type), and Theme Options (12 configuration options). Full report saved with file locations and line numbers for test generation.
Auditoría de seguridad
SeguroAll 29 static findings are false positives. The skill is a legitimate WordPress theme analyzer that uses safe file reading and regex pattern matching. No cryptography, command execution, or network access present. The flagged items are documentation examples, JSON metadata, and standard file validation.
Puntuación de calidad
Lo que puedes crear
QA 工程师构建测试套件
质量保证工程师可以分析 WordPress 主题,自动生成 Playwright 的综合测试用例列表,确保对表单、导航和交互元素的完整覆盖,无需人工检查。
WordPress 开发人员规划测试
主题开发人员可以扫描正在进行的主题,识别所有可测试的组件,帮助规划测试策略,确保在开发周期中不遗漏关键的用户流程。
DevOps 团队记录主题
DevOps 团队可以使用生成的报告记录主题功能,了解表单提交流程,并在部署或迁移项目之前识别依赖项。
Prueba estos prompts
Analyze the WordPress theme at /path/to/theme and show me all forms and navigation menus
Run wp-test-analyzer on my theme directory and generate a complete JSON report of all testable elements including forms, links, dynamic content, and JavaScript interactions
Analyze /var/www/html/wp-content/themes/my-theme and extract all form elements with their fields, nonces, and validation patterns for test case creation
Scan the theme at /home/user/wordpress/themes/custom-theme and identify all custom post types, their supports arrays, and related theme options for testing custom content workflows
Mejores prácticas
- 在干净的、已提交的代码上运行分析器,以确保结果的一致性并支持跨版本比较
- 对自动化测试生成管道使用 JSON 输出格式,对人工审查和文档使用 markdown 格式
- 在处理大型父主题-子主题结构时,分别分析主题子目录,以按上下文隔离可测试元素
Evitar
- 不要在有语法错误或不完整 PHP 文件的主题上运行分析器,因为正则解析可能产生不完整的结果
- 不要在未先审查代码的情况下分析来自不可信来源的主题,因为分析器将在没有安全验证的情况下报告所有元素
- 不要仅依赖自动提取进行关键业务逻辑测试,因为复杂的条件流程可能需要手动设计测试用例
Preguntas frecuentes
此技能可以检测哪些类型的 WordPress 元素?
此技能是否适用于 WordPress 插件还是仅适用于主题?
分析器能否检测 WordPress 主题中的安全漏洞?
分析器支持哪些输出格式?
分析器如何处理 WordPress 在运行时生成的动态内容?
此技能是否需要运行中的 WordPress 安装来分析主题?
Detalles del desarrollador
Estructura de archivos
📄 SKILL.md