Skip to content

Reduce review times

Code review from other internal team members is a valuable part of the development workflow. Reviews and feedback can be received, and a pull request can be approved more quickly by following these guidelines.

Before creating a pull request

  • Scan the updated code locally with PHP Code Sniffer using the VIP Coding Standards. Address any issues reported in the PHPCS feedback output.
  • Create smaller, separate pull requests, especially for changes that affect more than 1000 lines of code.
  • Separate pull requests should be created for:
    • Extensive whitespace changes (e.g., fixing tabs and spacing)
    • Changes that are limited to style only (e.g., revising variable names, formatting, comment blocks, etc)
    • Addition of a plugin. Create a separate pull request for each plugin added.
    • Removal of a plugin, or removal of several files.
    • A build step that results in minified or compiled JS and CSS. Setting up branches with continuous integration and deployment (CI/CD) may simplify this process.
  • Remove unused or unnecessary code from the production branch that does not need to be reviewed.
  • Commit messages in a pull request and in the initial comment are helpful to reviewers. Summarize the intent of the changes and add detail about complex abstractions.

After a pull request is created

  • View the pull request in GitHub and confirm that only intended changes are included, especially if there are changes made to .gitignore.
  • Pull requests that contain only CSS changes (or do not contain any files with extensions that are not reviewed by the VIP Code Analysis Bot, such as PHP and JS) will be auto-approved.
  • Development related to the pull request should be complete, with the exception of changes made to address feedback from the VIP Code Analysis Bot and the VIP reviewer’s comments.
  • When making changes in response to a review, minimize the number of new commits in order to simplify the reviews needed.
  • Avoid making changes to an approved pull request. If possible, make needed changes in another branch, or wait until after the open pull request is merged.

Last updated: December 22, 2023

Relevant to

  • WordPress