Key points
- AI writes plausible code fast; validating it remains a human job.
- Typical mistakes: invented functions, security gaps, missed edge cases.
- Automated tests and a focused review prevent most problems.
We use coding assistants every day, for WordPress and for our SaaS. They clearly speed up repetitive work. But code that “looks right” is not code that is right. Here is what we check every time.
The most common mistakes
- Functions that do not exist: a plausible but invented hook or method name. The code does not always crash; it simply does nothing.
- Missing security: unsanitised form data, unescaped HTML output, no nonce or capability check.
- Edge cases: empty lists, null values, another language, time zones.
- Outdated APIs: syntax that was fine three versions ago and is now deprecated.
Our review checklist
For any WordPress code we check three things before even testing: every input goes through a sanitize_* function, every output through esc_html() or esc_attr(), and every sensitive action checks a nonce and current_user_can().
Then we read the code line by line asking: “what happens if this value is empty?” That is where most bugs hide.
Testing beyond the happy path
We ask the assistant to write the tests too, then add the cases it did not think of. PHPUnit for PHP; in the browser, a Playwright script that opens the page on mobile and desktop.
Everything goes through a staging site first. Nothing ships straight from an AI’s output.
Where AI really helps
- Scaffolding a plugin or a block.
- Converting code (jQuery to vanilla JavaScript, for example).
- Explaining legacy code before a rebuild.
- Generating test data and scenarios.
FAQ
Is AI-generated code worse?
Not necessarily, but it is uneven. Final quality depends on review and tests, just as with a junior developer.
Can a whole project be handed to an AI?
Not without an experienced developer who sets the architecture, reviews the work and owns the release.
We combine AI with over 12 years of WordPress experience: the speed of one, the care of the other.



