Skip to content

Instantly share code, notes, and snippets.

@ramiwds
Last active January 18, 2024 20:03
Show Gist options
  • Save ramiwds/563b667739696e1ead747ab70df6bf67 to your computer and use it in GitHub Desktop.
Save ramiwds/563b667739696e1ead747ab70df6bf67 to your computer and use it in GitHub Desktop.
lead-engineer-review-checklist

Lead Engineer Code Review Checklist

General

  • Effective use of guard clauses to prevent unaccounted conditions from proceeding in a method
  • No vague variable names.
  • Reward brevity.
  • Is this the least amount of code possible to accomplish the goal?

Interpersonal

  • Don't allow anything upstream which is below-quality, even if it's legacy code. The exceptions being that the it's third-party, the time to refactor isn't reasonable, or the file spans numerous concerns and isn't practical to refactor.
  • If you don't know the engineer yet, err on the side of politeness and don't assume they have a thick skin forged from years in open-source.
  • Encourage an engineer arriving at the solution themselves. Never take away their victory by being impatient and doing their work for them.
  • Keep teaching moments within the scope of the task.
  • Regularly announce when someone writes good code. Call them out. I know it takes energy but try to remember how important those moments felt.
  • Never assign anything you wouldn't do yourself.
  • Always test the entire thing, no matter how obvious it seems to work. You're as fallible as anyone else.

Front-end

  • (FEE) Dont' use an AJAX request for global, single-use variables, opt instead for wp_localize_script
  • Typecasting is used for any methods wit ha return value, especially bool and int.
  • (FEE) SCSS is nested no more than 4 or 5 levels
  • (FEE) SCSS file nesting beyond one level shouldn't be used except for exceptionally-large style sets.

WP-specific

  • (FEE) No static assets should be called in a way that halts rendering unless the halted elements need data from that source.
  • (WP) No custom scripts or styles should be used when a core asset can be used to acheive the same purpose at the same quality and brevity.
  • (WP) Any registered action of filter has its' own docblock, includign description of the filter or action.
  • (WP) WPCS and doing it the WP way(tm), unless an adequate reason for the custom method is valid.

Back-end

  • No more than two namespace contexts should be in play concurrently.
  • No overloadable functions/methods
  • (SEC) Class inheritance shouldn't occur deeper than three levels except in PII or finance contexts. [ ] Maintain a separation of concerns between all files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment