A code review checklist from Reviewpad
Tags: codereview, checklist, beginners
Published: 2021-08-20 09:25:02

_Not everyone will need a checklist for code reviews, and not all code reviews will fit into your checklist. We accept that, and [we have written about how some more senior developers sometimes even think they get in their way](https://reviewpad.com/blog/six-more-best-practices-to-improve-your-code-review/). They are a very good idea, however, if you haven&#39;t yet reached a comfort zone with your reviews._

A good checklist will keep you **consistent**. It will also prevent mistakes and omissions.

Here&#39;s our humble proposal, just to get you started:

### Are all requirements met? 📋

Requirements are the basis for all development. Regardless of what the project you&#39;re working on is, and its scope, you will have a series of basic (and not so basic) requirements that the code must accomplish.

Check them, one by one.

Find the relevant code.

Review it.

Job done.

### Are code conventions being followed? 🤝

Code conventions aren&#39;t bylaws, and they will change from project to project, and from language to language. They must be kept consistent throughout, otherwise, you can give rise to a whole ocean of troubles.

Whatever&#39;s been established for the project and language you&#39;re working with, it&#39;s your job while doing a code review, that everything is up to snuff. That ranges from things as trite as indentation to things as meaningful as comments.

**Consistency** is the key word.

### Are magic values/scenarios accounted for? 🦄

What would you think if you saw the number 259200000 in the middle of a particularly important piece of code about dates (i.e. days and months, not romantic liaisons), with no explanation?

And that number is absolutely key for the way the function works?

You wouldn&#39;t be happy, would you? Well, that&#39;s the number of milliseconds in three days, and some people might immediately get it and others might not. Anything that is key for the inner workings of your code that isn&#39;t explained, is said to just &quot;magically&quot; work.

There&#39;s no magic in development. Make sure everything is clear. Which leads us to:

### Is the code easy to read? 🤓

Remember: you don&#39;t know who is going to be doing maintenance on the code base your team is working on. It may be you, or not. And even if it is you, it&#39;s going to be the **future you**. We can promise you right now that you will not remember why that wonderfully clever function you&#39;ve just written down works.

Everything needs to be readable. As readable as you can possibly make it.

### Does it have good test coverage? ✅

As much as the codebase as possible should be covered when running your tests. If the percentage isn&#39;t high enough, then you probably need to consider changing the battery of tests you&#39;re running.

Tests aren&#39;t technically a part of code reviews, but they definitely go hand in hand as two of the most effective practices to ensure code quality.

### Is there no unused code? 💤

Pretty self-explanatory, right? If the code is unused, it shouldn&#39;t be there. No good can come of it. Only mistakes.

---

Did you enjoy our little checklist? Did we miss something? Is there a key step to your reviewing process that you feel should be on everyone&#39;s list?

Make sure to drop us a line on Twitter (@CodeReviewpad) and let us know.