What problem does it solve?
WordPress projects often struggle with static analysis due to dynamic WP APIs and third‑party plugins. This skill guides configuring PHPStan for WordPress, establishing baselines, and applying WordPress‑specific typing to reduce false positives.
Core Features & Use Cases
- PHPStan setup: create and maintain phpstan.neon and related configuration for WP plugins/themes.
- Baseline management: generate and maintain a baseline to gradually fix legacy issues without blocking progress.
- WP-specific typing: use WordPress stubs and annotations to improve type inferences for REST, hooks, and WP data structures.
- Use Case: when working on a WordPress plugin, run PHPStan to catch type issues early and validate changes against the WP API surface.
Quick Start
Run the PHPStan inspection script to generate an initial analysis and baseline for your WordPress project: node skills/wp-phpstan/scripts/phpstan_inspect.mjs