Google is sharing “How to do a code review” as part of its engineering practices. Unlike many similar guides online, I find this document to be a lot more comprehensive. It covers both the technical bits of the process, as well as suggestions that improve overall team communications and efficiency.
A particular type of complexity is over-engineering, where developers have made the code more generic than it needs to be, or added functionality that isn’t presently needed by the system. Reviewers should be especially vigilant about over-engineering. Encourage developers to solve the problem they know needs to be solved now, not the problem that the developer speculates mightneed to be solved in the future. The future problem should be solved once it arrives and you can see its actual shape and requirements in the physical universe.
GrumPHP is yet another quality control tool for PHP. But unlike a million other – PHPUnit, PHP CodeSniffer, and the like – this one is more of a tying knot. GrumPHP integrates via git hooks. It runs one more of the other tools, making sure that the changes you are committing are up to the par.
The support for other tools is excellent. You’ll find anything from the basic unit tests and coding style checks to commit message formatting and content, Robo tasks, and even custom shell scripts.
PhpMetrics is yet another tool in the ever growing list of the static code analyzers for PHP. Compared to the rest, I think this one is the easiest to install and run. And it produces the most eye candy reports ever. The generated report is in the HTML format, with fancy charts and graphs, and makes it really easy to spot and fix the issues.