Theme Sniffer is a tool that helps reviewers and developers check the themes they are reviewing/developing against several coding standards.
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., and a lot has changed since then. For close to a year now I’ve been working on upgrading the plugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party a bit, and the new version is nearing completion.
The new version has updated codebase, updated coding standards (updated WPCS and added WPThemeReview standard as well), newer version of PHP_CodeSniffer which brings some performance updates and some other tweaks.
Even though the majority of the plugin is functional, it still has some issues.
This is where I need your help.
The new PHPCS PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. has a different way of running the sniffer, using the Runner class and the Config class. For Theme Sniffer Theme Sniffer is a plugin utilizing custom sniffs for PHP_CodeSniffer that statically analyzes your theme and ensures that it adheres to WordPress coding conventions, as well as checking your code against PHP version compatibility.
The plugin is available from GitHub.
Themes are not required to pass the Theme Sniffer scan without warnings or errors to be included in the theme directory. to perform the sniffing process it needs to write it’s own runner.
The issue I’m having is that some of the custom config settings are not working properly.
One way you can help is to see what could be the issue with this.
How to setup the development of the Theme Sniffer?
To start working on the development of the plugin you need to have a development environment. I’m using VVV, you can work on whatever works the best for you.
Steps to reproduce:
1. Go to your plugins folder and clone the repository
git clone firstname.lastname@example.org:WPTRT/theme-sniffer.git
2. Go to the directory
git checkout development
4. Go to
theme-sniffer folder and run
npm install and
npm run build (in that order)
5. Activate your plugin and test away
Anything you find you can report in the opened pull request, or in the slack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. #themereview channel.