phpcs for WordPress

PHP Code sniffer is a code validator. In the tutorial: “Using PHP CodeSniffer With WordPress: Installing and Using the WordPress Rules” Tom McFarlin explains how to install the codesniffer with WordPress-specific sniffs.

Then Tom McFarlin gives a demo on a phpcs on the plugin Hello Dolly:


phpcs --standard=WordPress hello-dolly

I have installed the sniffer following the suggestions in McFarlin’s tutorial on a LAMP server with WordPress. So the tool’s in the box.