Peer review check-list
These are the things I have picked up from peer-reviewing issues. They can also be applied when solving issues. If you can think of anything that needs to be added, please do so.
Syntax
Ensure that:
- There are no unnecessary blank lines in the new code.
- Blank lines do not contain spaces.
- Variables are named correctly (all lower case, no underscores).
- Functions are named correctly.
- There are no changes to whitespace in other areas on the file.
Output
Ensure that:
- The code doesn't use buffered output unless absolutely necessary.
- Lang-strings are used for output of text.
- There are no hard-coded strings for text output.
Databases
If there is SQL code you can test quickly, do so.
Ensure that:
- There are minimal DB calls (no excessive use of the DB).
- The code uses SQL compatible with all the supported DB engines.
Misc
Ensure that:
- The code doesn't use deprecated functions https://docs.moodle.org/dev/Deprecated_functions_in_2.0
- The code makes sense in the broader scheme of things – look at the whole function, not just the altered code.
- The code is easy to understand, and where it isn't, comments have been provided.