Skip to content

Instantly share code, notes, and snippets.

@briedis
Created September 19, 2016 13:32
Show Gist options
  • Save briedis/3ff94dbd727a978e5f6a926ae6db6346 to your computer and use it in GitHub Desktop.
Save briedis/3ff94dbd727a978e5f6a926ae6db6346 to your computer and use it in GitHub Desktop.
Code review checklist

General

  • Is branch up-to date with master branch?
  • Is auto-format performed? (on new code/edited code block (function, etc) Should avoid messing git history with auto-formatting!)
  • Are all IDE errors fixed (green check mark in corner)?
  • Are variable names self-describing?
  • Are function names self-describing?
  • Are boolean function/variable names prefixed with is, has, can, should, etc.?
  • Is function line count too much, can something be split up?
  • Is file line count too much (>400), can something be split up?
  • Are non-obvious code fragments/hacks commented?
  • Do functions perform only one thing, or they should be split in to multiple functions?
  • Are there any hardcoded values (ids, types) that should be moved to constants?
  • Are there any complex if conditions that could be simplified by defining variables? ($isSomething = $this->something->something || $this->somethingElse)
  • Are there any obvious comments that sould be removed? (function getUser() // Gets user)

JS

  • Are private variables, methods prefixed with _ ?
  • Are all function parameters type-hinted in JSDOC?
  • Does prototype default values contain objects (PF.Something.prototype.value = [])?
  • Are global objects referenced or more than one level object access? (this._otherComponent.something.otherValue)

SQL

  • Are indexes being used correctly for heavy tables?
  • Are there multiple update/insert queries that should use a transaction?

Migrations

  • Are id fields unsigned?
  • Are id field suffixed with _id?
  • Are date fields in TIMESTAMP format?
  • Are date fields suffixed with _at?
  • Are table names in format: users, user_wallets, user_wallet_transactions?
  • Are boolean type columns tinyint and prefixed with is_ ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment