Skip to content

Instantly share code, notes, and snippets.

@hqhow
Last active July 13, 2020 15:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hqhow/8a4893683d17ecda06f4b725afb74101 to your computer and use it in GitHub Desktop.
Save hqhow/8a4893683d17ecda06f4b725afb74101 to your computer and use it in GitHub Desktop.
Write a WordPress Plugin - Checklist and Standards - HQHow.com

This collection on standards by HQHow.com

  • Escape, echo, sanitize,...validate input data
  • Every echo must include text-domain for the translation
  • If there's empty file, delete it
  • If there's the commented code, delete it on the production commit.
  • If you want to regist the resources file, like CSS or JS, you must pay attention to the - performance and how it will affect to user's site
  • For every output class name, they must have the plugin prefix, i.e InnoRef, the prefix should be inr-your-class-name
  • Try not to override the basic elements like a, b, strong, i....you will want to mantain the consistancy of the UI through out the website
  • If you want to call and run AJAX, you just do it via wp-ajax.php action, and must pay attention to logged in/out user case.
  • When echo, must check isset to validate data
  • Using Try catch on CRUD actions
  • Do not try to make your customer subscribe to your netsletter via plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment