Code Review checklist

Code review is important in software development life cycle. It’s intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers’ skills.

To make code review more efficient and effective, offline code review is required so reviewer can take time to navigate through the code and check from the high-level structure to low-level implementation.

Here is the checklist that can be used for code review

  1. Check project structure (conform to your company’s standard)
  2. Code Design
    a. What Design Patterns are used
    b. What Data structure are used
    c.  Following the best practice
  3. Error handling
  4. Logging
  5. Potential resource leaks?
    a. like database/http connection not closed after use,
    b. memory not released after use
  6. Thread safeness?
    a. Thread A shouldn’t modify thread B’s data,
    b. Deadlock or lock contention?
  7. Control structure (Are loop ending conditions accurate? No unintended infinite loops?)
  8. Performance
    a. Are there unnecessary repeated calls,
    b. recursive functions run within a reasonable amount of stack space
  9. Conform to Coding conventions
    a. Naming convention
    b. Formatting rules: Layout, Indentation?
    c. Documentation/Commenting/Javadoc
  10. Code reuse (any code if used more than once, write a function/procedure)
  11. Boundary checking
    a. input parameter explicitly checked for nullity or emptiness
    b. no out-of-bound indexes when accessing array or list
  12. Security/Vulnerabilities
    a.  Format string exploits, race conditions, buffer overflows
    b. SQL injection
    c. Cross site scripting
  13. Unit test coverage

Additionally, specific tools for collaborative code review can facilitate the code review process. Last but not least, follow-up review is recommended to make sure review feedback is built into the code.

(Visited 11 times, 1 visits today)