KIT TOOL · TESTING
Testing and code quality tools, ready on every site
The testing and code quality tools a careful developer runs are already installed on the dev box. The assistant runs them after it changes markup and again before it calls a job done, reads what they say and fixes what it finds before you see the work.
$ phpstan --versionPHPStan - PHP Static Analysis Tool 2.3.4$ phpcs --versionPHP_CodeSniffer version 3.13.6 (stable)$ ruff --versionruff 0.17.2$ pip-audit --versionpip-audit 2.10.1$ composer --versionComposer version 2.10.3$ uv --versionuv 0.13.6$ playwright --versionVersion 1.64.101 · QUICK ANSWERS
What people ask first
Do I have to install anything?
No. One shared install of the tools is on the dev box and every site uses it. A project that pins its own copies in vendor or node_modules can run them through vendor/bin, npx or its own scripts.
Which languages are covered?
PHP, Python, JavaScript, CSS and HTML. PHPStan and PHP_CodeSniffer read the PHP, ruff and pip-audit the Python, ESLint and Stylelint the scripts and styles, and html-validate the markup. PHPMD, PHPUnit and Infection are there for PHP too.
What happens when a check fails?
The assistant fixes what it caused before it calls the work done, and tells you which warnings it left and why.
Can I choose which checks a site runs?
Yes. Each site has its own list on its Settings tab. Add a check, pick the tool, the folder, its config and the files it covers. With no list of its own, a site runs the eight browser checks.
Can the checks run every time the code changes?
Yes, with a rule on the Events page. A new commit on a site's branch can start its checks, and a failed check can tell you or ask the assistant to look.
Where do I see what a check found?
On the site's Checks tab. Each check shows its newest result, every problem with its file, line, rule and level, and links to the full report. The last 30 reports are kept.
Can it run my Playwright tests against WordPress?
Yes. Each run builds a throwaway WordPress from your .wp-env.json, runs your setup commands and then your tests, and removes it all after. A suite that starts wp-env itself has to change.
Do my project's own tool versions win?
Yes. A folder's own copy in vendor/bin or node_modules/.bin runs first, on the site's PHP version. Otherwise the box's copy runs.
02 · STATIC ANALYSIS AND STANDARDS
PHP read before it runs
PHPStan at level 8 with strict and deprecation rules, PHP_CodeSniffer with the WordPress, PSR-12 and PHPCompatibility standards, and PHPMD. A project can keep its own phpstan.neon, and the settings the assistant keeps for it stay outside the repo, so nothing extra lands in a commit.
$ phpstan analyse -c /opt/karkinos/tooling/phpstan.neon .[OK] No errors$ phpcs --standard=WordPress --report=source .Squiz Commenting File comment missing package tag 6Squiz Commenting File comment spacing after comment 6A TOTAL OF 12 SNIFF VIOLATIONS WERE FOUND IN 2 SOURCES03 · YOUR CHECKS, PER SITE
Pick the checks each site runs
Each site keeps its own list of checks. Add one in four steps, and add the same tool twice if two folders need it.
The tool
PHPCS, PHPStan, PHPMD, PHPUnit, Infection, JavaScript lint, CSS lint, or end to end tests in a throwaway WordPress. The eight browser checks can be entries too.
The folder and its config
The folder it runs in, such as one plugin. Its own config file is used when it has one, or one you point at, or the box's own.
The files it covers
Paths inside that folder, or what the config lists.
The options
The PHPStan level and memory, PHPUnit test suites, Infection threads and the lowest mutation score that passes, and an end to end run's setup and time limit.
On or off
A check that's off is left out of Run all checks, and can still be run on its own.
04 · THE CHECKS TAB
Every problem, by file and line
Each check's newest result sits on the site's Checks tab, with its problems listed by file, line, rule and level, and links to the full report and the tool's own output.
| Check | Tool | Result | Errors | Warnings | Last run |
|---|---|---|---|---|---|
| Coding standards, shop plugin | PHPCS | Failed | 3 | 12 | Today 10:42 |
| phpstan | PHPStan | Passed | 0 | 0 | Today 10:43 |
| phpunit | PHPUnit | Passed | 0 | 0 | Today 10:44 |
| lint-js | JavaScript lint | Passed | 0 | 4 | Today 10:44 |
| e2e | End to end | Passed | 0 | 0 | Today 10:51 |
| a11y | Accessibility | Passed | 0 | 5 | Today 10:53 |
| Level | File | Line | Rule | Message |
|---|---|---|---|---|
| error | plugins/willow-shop/src/Cart.php | 42 | WordPress.Security.EscapeOutput | All output should be run through an escaping function. |
| error | plugins/willow-shop/src/Cart.php | 88 | WordPress.Security.NonceVerification | Processing form data without nonce verification. |
| error | plugins/willow-shop/willow-shop.php | 17 | WordPress.WP.I18n | Missing text domain. |
| warning | plugins/willow-shop/src/Admin.php | 9 | Generic.Commenting.Todo | Comment refers to a TODO task. |
05 · RUN BY HAND OR BY A RULE
Run them when you like, or when the code changes
Press Run all checks, run one, or let a rule on the Events page start them. A run goes on by itself, so you never wait on a long test suite.
A dev site's check passed
Fires for each check with no errors, with its counts and a link to the report.
A dev site's check failed or could not run
Fires for each check that found errors or couldn't run, with the reason.
Never in the way
Checks never stop a release. One check stops after 4 hours.
A ruleWhen a dev site's branch has a new commit, run that site's checks.
The commit is seen
The box looks at each site's branches every minute.
- A dev site's branch has a new commit
The run starts
On the dev box, on its own, one run at a time.
Packages first
composer install and npm ci run in each folder that has the lock files.
Each check in turn
The site's checks that are on, in order. Each writes a report, and the last 30 are kept.
One event per check
Passed, or failed with its errors.
- phpstanPassed
- Coding standards, shop pluginFailed
You hear about it
Another rule can leave you a note or ask the assistant to look.
Checks run by the assistant over ssh fire no events. Example data.
06 · PYTHON, JAVASCRIPT AND MARKUP
The same care beyond PHP
ruff
Lint and format checks for Django and Flask, reading the project's own settings when it has them.
pip-audit
Known advisories in the packages of a Python site.
wp-scripts
ESLint, Stylelint and Prettier for scripts and styles, and the block build.
html-validate
The HTML a site sends, or with the --dom option the page after its scripts have run.
astro check
Type and template checks on an Astro site, from the project's own copy.
07 · PACKAGES
Packages installed and audited
Composer, npm, pnpm, yarn and uv install a site's packages, and a release build installs exactly what the lockfile says. Day to day it is composer install and npm install. check-deps runs composer audit, npm audit and pip-audit on each site and names anything rated high or critical.
| Tool | For | Runs on | Ready on the box |
|---|---|---|---|
| Composer 2.10 | PHP sites | The site's own PHP version when it matters | Yes |
| npm, pnpm and yarn | Node sites | Node 20, 22 or 24 | Node 22 and 24. Node 20 downloads the first time. pnpm and yarn come on first use. |
| uv 0.13 | Python sites | Python 3.11, 3.12 or 3.13, a virtual environment each | Python 3.13. 3.11 and 3.12 download the first time. |
08 · TESTS
Unit, mutation and browser tests
Each runs as a check of its own, so its result sits on the Checks tab with the rest.
PHPUnit 12
Coverage runs on PHP 8.4, and PHP 8.1 to 8.3 run PHPUnit without it. WordPress suites get a test database of their own. With the Yoast polyfills, so WordPress suites written for older PHPUnit run too.
Infection
Mutation testing, to show whether the tests would notice a change. Set the lowest mutation score that passes, or leave it empty and escaped mutants are only warnings.
Playwright 1.64
Chromium installed. An end to end suite points at the dev site once WP_BASE_URL is set to it.
End to end on a throwaway WordPress
Each run builds a fresh WordPress from the folder's .wp-env.json, with its plugins and themes, runs the setup commands you give it and then your tests. It's all removed after, so nothing touches your dev site.
09 · RUN ALL CHECKS
One command before it says done
check-all runs the site's checks that are on, in order. A site with no checks of its own runs the eight browser checks below. Each writes a report, and the newest of each shows on the site's Checks tab.
Security
Headers, cookie flags, directory listings and files that should never be public.
Links
The whole site crawled for broken links, and a missing page that answers 404.
HTML
Valid markup, as sent or after its scripts have run.
Render
Console errors, failed requests, other hosts called and unused CSS and JavaScript.
Accessibility
axe, Lighthouse, target size, focus, text spacing, reflow and a screen reader transcript.
Lighthouse
Performance, accessibility and best practices over several pages, held to budgets.
Screenshots
Full pages at desktop and phone width, compared with the last ones you accepted.
Dependencies
composer audit, npm audit and pip-audit, as the lock files say.
10 · REVIEWS AND HOUSE RULES
Checked against written rules, not a feeling
The tools catch what a machine can. Two skills cover the rest.
web-dev-review
How a senior WordPress reviewer checks a change: the real tools on the dev box, the review checks that fit the change (escaping, nonces, capabilities, prepared SQL and more), and an accept or return verdict down to the file and line.
web-dev-site-rules
House rules every site is built to, one common list and one per stack. The assistant scores its own work against them before it says it's done, fixes what fails, and saves the report in your documents.
Xdebug when you need it
Switch it on for one PHP site to step through, trace or profile a request, and download the files from the site's Traces tab.
Also on the box
PHPCBF to fix coding standards, wp-stub for stubs of any WordPress plugin, and sass, postcss-cli, rtlcss and npm-run-all.
11 · THE REST OF THE KIT
More of the kit
The testing tools sit beside the browser, the SEO and GEO checks and the rest of WebDev (in a box).
WebDev (in a box)ITS OWN PARTS
- Git, releases and deploysA branch, a pull request, a checked release, a deploy and one step back.
- Shopify and BigCommerce themesTheme Check and Stencil before anything is pushed to the store.
- Your current siteA dev copy of the site you already run, on its own stack.
- Site stacksEvery kind of dev site, from plain HTML to WordPress and Django.
- Hosted buildersShopify and BigCommerce theme dev sites, checked before every push.
TOOLS IN THE KIT
- Browser toolsSearches the web, reads a page as text, and opens it in a real browser to click, fill in and take screenshots.
- SEO and GEO checksChecks how your live sites are found by Google and cited by AI search, on demand or on a schedule, with a change log.
- Accessibility checksaxe and Lighthouse against WCAG 2.2, with a screen reader transcript.
- DesignScreens, layouts and components in the browser (Penpot), with the assistant designing in the same files, live.
- MarketingEmails to customers who opted in, review requests and social posts. Every email waits for your yes.
- Office suiteDocuments, spreadsheets and presentations open from Files in your browser (Collabora), with the assistant in the same file.
- Creative suiteOpen source editors for photos, vectors, layout, PDFs, video, motion and sound (the Craft apps).
- Your voiceLearns how you write from your own writing, then checks or rewrites any text so it sounds like you.
- FeedsNews, blogs and YouTube channels in one reader, searched and sorted for you, with saved searches.
12 · THE STACKS AND BUILDERS
On every stack you run
Every site runs on the PHP, Python or Node version it needs, side by side on the same server, and the quality tools are one shared install. WordPress, Laravel, Drupal, Craft, Joomla and Django come with a database, and Statamic, plain PHP, Flask, Astro and Next.js get one when it is switched on for that site. Anything else that runs on Linux starts as an empty site. HTML with a JavaScript and CSS build is a kind of its own, and Shopify and BigCommerce themes get dev sites too.
READY WHEN YOU ARE
Checked work, every time
WebDev (in a box) runs on your own cloud server, hosted in Europe, from £250 a month.