PHP_CodeSniffer, PHPMD or PHP Depend


The function pdepend is used to generate a large set of software metrics from a given code base. The generated values can be used to measure the quality of a software project. They help in identifying the parts of an application where refactoring is required.


The phpmd scans the PHP source code and searches for potential problems that could be possible bugs, not-so-optimal code, or overcomplicated expressions.


The phpcs function tokenises the PHP, JavaScript and CSS files and figures out issues/violations in a set of pre-defined coding standards. It ensures that the code remains consistent and neat. It also helps in preventing common semantic errors that are usually committed by coders.