Magento recommends the consistent use of a code sniffer to enhance the readability of your code and help ensure that it meets Magento code standards. A code sniffer is a tool that automates the process of identifying code irregularities.
It allows automatically check your code against some of the common Magento and PHP coding issues, like:
- Raw SQL queries;
- SQL queries inside a loop;
- Direct class instantiation;
- Unnecessary collection loading;
- Excessive code complexity;