[!NOTE] These review guidelines are a work in progress, and are frequently updated and improved, so please check back frequently for the latest version.
Make sure you understand what the PR is trying to solve or implement. This could be a bug fix, a new feature, or a refactor.
If the PR has a linked issue, read it to better understand the context and the reason for the change.
Make sure relevant tests have been added or modified. If the PR adds new functionality, there should be tests covering the change.
Check if the code adheres to the style guidelines of the project. Make sure
there are no unused imports, variables, console.log
for debugging in the PR.
Is the code easy to understand for other developers? Make sure complex parts are explained with comments about why something is done, and use clear names to show how. Are variables and functions well-named, and is there a consistent naming style? Also, check if the code is maintainable:
Is the PR well documented? Check if the descriptions of functions, parameters, and return values are present. Are there any changes needed to the README or other documentation, for example, if new features or configurations are introduced?
Ensure that the new code is properly tested. This includes unit tests, integration tests, and if necessary, end-to-end tests.
Did all tests pass in the CI pipeline (e.g., GitHub Actions, Travis, CircleCI)?
If the changes depend on certain environments or configurations, verify that the code has been tested in various environments (e.g., local development, staging, production).
Check for potential security problems, such as SQL injection, XSS attacks, or unsafe API calls. Are there passwords, tokens, or other sensitive data left in the code by mistake?
Is access to sensitive data or functionality properly secured? Check that the correct authorization and authentication mechanisms are in place.
Check if the changes negatively impact performance. This can include factors like load times, memory usage, or other performance aspects.
Are the changes consistent with the project goals and requirements? Ensure the PR aligns with the architecture and design principles of the project.
If the PR depends on other PRs or changes, verify that they integrate well with the rest of the project. Ensure the code does not cause conflicts with other active PRs.
Does the change break compatibility with older versions of the software or dependencies? If so, is there a migration plan in place?
If the PR affects the user interface, ensure that it meets accessibility standards:
Provide clear, constructive feedback on what is good and what can be improved. If improvements are needed, be specific about what should change.
Ensure your feedback is friendly and open, so the team member who submitted the PR feels supported and motivated to make improvements.
## Go/No-Go Decision ### Go If the code has no issues and meets the project requirements, approve it (and possibly merge it). ### No-Go If there are significant issues, such as missing tests, security vulnerabilities, or performance problems, request the necessary changes before the PR can be approved. Some examples of **significant issues** include: - Missing tests for new functionality. - Identified **security vulnerabilities**. - Code changes that break **backward compatibility** without a proper migration plan. - Code that causes **major performance regressions** (e.g., high CPU/memory usage). ## After the Review ### Reordering and merging Once the necessary changes have been made and the PR is approved, the code can be merged into the main branch (e.g., `main` or `master`). ### Testing after merging Ensure that the build passes after merging the PR, and re-test the functionality in the production environment if necessary. ## Follow-up ### Communication with team members If the PR has long-term technical or functional implications, communicate the changes to the team. ### Monitoring Continue monitoring the production environment for any unexpected issues that may arise after the code has been merged.
This process ensures that PRs are systematically and thoroughly reviewed, improving overall code quality.