Recap of the Theme Review Coding Standards Meeting

We had a productive meeting today. Juliette Reinders Folmer, William Patton, Ulrich Pogson and I went through all open pull requests and issues of the Theme Review Coding Standards repository. The meeting resulted in closing a lot of pull requests that couldn’t be implemented using Code Sniffer, identifying those that could be quickly rebased and updated to work with PHPCSPHP Code Sniffer PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. 3.x, and merging several that were ready to be merged.

We also went through the open issues and closed some, while others were labeled appropriately. On some issues we need a second opinion or more information to crystallize what actually needs to be sniffed for, so be sure to leave a comment.

As development in the WordPress Coding StandardsWordPress Coding Standards The Accessibility, PHP, JavaScript, CSS, HTML, etc. coding standards as published in the WordPress Coding Standards Handbook. May also refer to The collection of PHP_CodeSniffer rules (sniffs) used to format and validate PHP code developed for WordPress according to the PHP coding standards. project has been plenty active in the past year, several new WPCSWordPress Community Support A public benefit corporation and a subsidiary of the WordPress Foundation, established in 2016. sniffssniff A module for PHP Code Sniffer that analyzes code for a specific problem. Multiple stiffs are combined to create a PHPCS standard. The term is named because it detects code smells, similar to how a dog would "sniff" out food. were identified which we can use for the TRTCS ruleset, so those will be added in the coming weeks.

The authors of the pull requests that need to be updated were notified, and we decided to give them until Monday to respond whether they would like to continue work on the PR or not. After that Juliette will probably update them since she has the most knowledge about writing sniffs.

The way people can contribute, besides writing sniffs (which can be a bit daunting to someone who never wrote one), is to post code examples in the issues or in the pull requests that would correspond to the issue/sniffsniff A module for PHP Code Sniffer that analyzes code for a specific problem. Multiple stiffs are combined to create a PHPCS standard. The term is named because it detects code smells, similar to how a dog would "sniff" out food. in question. This really helps with unit testing the sniff as clear specifications make writing the sniff that much easier.

As for Theme sniffer, I’ve written a way to circumvent a possible bottleneck of code sniffer – minified files. This will need to be tested of course. In addition to that, the way files are sniffed will have to be changed – sniffing in batch, instead of the current way of sniffing files one by one. I’ll try to fix that as soon as possible so that you can test it and report possible issues.