WordPress - Tide Project
WordPress Tide Project that aims to Audit and Score WordPress Themes and Plugins based on Code Quality.
Tide is what ?
Tide is a series of automated tests run against every plugin and theme in the directory and then displays
PHP compatibility and test errors/warnings in the directory.
So what to do for WordPress Compatibility?
Without wasting any time, Let's start how to make our plugins or themes WordPress Compatible.
First Download Composer which is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries.
Steps for downloading Composer:
- Type Composer in a search engine you can directly open this link from here.
- Click on Download Button.
3) Then, click on Composer-Setup.exe link on this page.
4) After this, Install the composer by clicking Next and Next like other Applications. After this Click on Install Button to proceed the Installation.
Now goto Github Site, In the Search GitHub Box, Search WordPress Coding Standard and press Enter. After this This will redirect to the page as shown in the following image.
Click on WordPress-Coding-Standards/WordPress-Coding-Standards, this will redirect you to the another page, this page provides you the installation of Composer.
Now, Open Command Prompt, and copy this code and paste it.
composer create-project wp-coding-standards/wpcs --no-dev
Running this command will:
- Install WordPress standards into
- Install PHP_CodeSniffer.
- Register WordPress standards in PHP_CodeSniffer configuration.
- Make phpcs command available from wpcs/vendor/bin.
Using phpcs as a global command, you may need to add the path to the
wpcs/vendor/bindirectories to a
PATH environment variable for your operating system.
How to set Environment Variable:
- Goto System, Click on Advance System Settings.
- A System Properties Window appears, Click on Environment Variables.
- In the section User Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
- In the Edit User Variable Name, Set Variable Name as PATH, and Variable Value as C:\wpcs\vendor\bin and then click ok, then ok, and ok.
Okay Now You have also set your environment variable.
Installing WPCS as a dependency:
There are two actively maintained Composer plugins which can handle the registration of standards with PHP_CodeSniffer for you:
Click on Second link in a new tab, then you will be redirected to another page.
Installation can be done with composer, by requiring this package as a development dependency: Copy this code
composer require --dev dealerdirect/phpcodesniffer-composer-installer
and paste it on the command prompt.
This plugin executes the following steps:
- This plugin search for phpcodesniffer-standard packages in all of your currently installed Composer packages.
- Matching packages and the project itself are scanned for PHP_CodeSniffer rulesets.
- The plugin will call PHP_CodeSniffer and configure the
Now all the steps have been completed, You can check by running the phpcs command on command prompt. if it's not executed, Restart your System and check again.
Open Your Project on Atom - free and open-source text and source code editor developed by GitHub. You have to install the Packages to see and fixed phpcs Errors.
If You liked my Article, Then Please share it and Like my Facebook Page for Latest WordPress Tutorials and Latest Updates. You can also join my Newsletter for latest updates.