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.

REAL RUN · THE DEV BOX2 November 2026, the versions on the dev box
$ 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.1

01 · 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.

REAL RUN · A WORDPRESS THEME2 November 2026, on a WordPress theme, output as it came back
$ 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 SOURCES

03 · 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.

Each check's newest result
CheckToolResultErrorsWarningsLast run
Coding standards, shop pluginPHPCSFailed312Today 10:42
phpstanPHPStanPassed00Today 10:43
phpunitPHPUnitPassed00Today 10:44
lint-jsJavaScript lintPassed04Today 10:44
e2eEnd to endPassed00Today 10:51
a11yAccessibilityPassed05Today 10:53
Problems in Coding standards, shop plugin
LevelFileLineRuleMessage
errorplugins/willow-shop/src/Cart.php42WordPress.Security.EscapeOutputAll output should be run through an escaping function.
errorplugins/willow-shop/src/Cart.php88WordPress.Security.NonceVerificationProcessing form data without nonce verification.
errorplugins/willow-shop/willow-shop.php17WordPress.WP.I18nMissing text domain.
warningplugins/willow-shop/src/Admin.php9Generic.Commenting.TodoComment 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.

  1. The commit is seen

    The box looks at each site's branches every minute.

    • A dev site's branch has a new commit
  2. The run starts

    On the dev box, on its own, one run at a time.

  3. Packages first

    composer install and npm ci run in each folder that has the lock files.

  4. Each check in turn

    The site's checks that are on, in order. Each writes a report, and the last 30 are kept.

  5. One event per check

    Passed, or failed with its errors.

    Events

    • phpstanPassed
    • Coding standards, shop pluginFailed
  6. 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.

Package tools on the dev box
ToolForRuns onReady on the box
Composer 2.10PHP sites
  • PHP
The site's own PHP version when it mattersYes
npm, pnpm and yarnNode sites
  • Node.js
Node 20, 22 or 24Node 22 and 24. Node 20 downloads the first time. pnpm and yarn come on first use.
uv 0.13Python sites
  • Python
Python 3.11, 3.12 or 3.13, a virtual environment eachPython 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.

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.

  1. Security

    Headers, cookie flags, directory listings and files that should never be public.

  2. Links

    The whole site crawled for broken links, and a missing page that answers 404.

  3. HTML

    Valid markup, as sent or after its scripts have run.

  4. Render

    Console errors, failed requests, other hosts called and unused CSS and JavaScript.

  5. Accessibility

    axe, Lighthouse, target size, focus, text spacing, reflow and a screen reader transcript.

  6. Lighthouse

    Performance, accessibility and best practices over several pages, held to budgets.

  7. Screenshots

    Full pages at desktop and phone width, compared with the last ones you accepted.

  8. 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.

  • 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)

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.

Ask about In a Box