Quality

Minimum PHP Version

PHPLint

https://github.com/overtrue/phplint

xmllint

We use xmllint to lint XML files.

brew install xmlstarlet

ESLint

We use ESLint to lint JavaScript and JSON files.

JSON (JavaScript Object Notation)

A lot of payment providers use JSON driven API’s. Also in WordPress and the WordPress Pay library jSON is used very often. WordPress and PHP JSON functions are used very often. Since we increased the minimal PHP version to 5.6 (or higher) we also start to use JsonSerializable::jsonSerialize.

No ‘lock’ files in libraries

https://blog.martinhujer.cz/17-tips-for-using-composer-efficiently/

WordPress Coding Standards

https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards

Slevomat Coding Standard

https://github.com/slevomat/coding-standard

PHP – Name resolution rules – Fully Qualified names (FQN)

In the WordPress Pay library we will try to use Fully Qualified names (FQN) to take full advantage of PHP opcode. The “Slevomat Coding Standard” library can be used to check on this.

Symfony Security Check

Exclude non-essential files in .gitattributes.

https://thephpleague.com/#quality

Avoid too many static methods