Peer review check-list
Syntax No unnecessary blank lines Blank lines do not contain spaces Variables are named correctly (all lower case, no underscores) Functions are named correctly
Output Doesn't use buffered output unless absolutely necessary Lang-strings used for output of text No hard-coded strings for text output
Misc
Doesn't use deprecated functions https://docs.moodle.org/dev/Deprecated_functions_in_2.0
Code makes sense in the broader scheme of things – look at the whole function, not just the altered code.
If there is SQL code you can check quickly, do so.
Minimal DB calls (no excessive use of the DB).