12 Tips for Developing Better WordPress Plugins

Developing a WordPress plugin can be in the beginning seems very hard to understand especially if you are just start to develop in PHP.

After a while you start to feel more secure and start developing more plugins almost on a daily basis, you may even start developing plugins for clients and because you don’t have much time you are stop learning the new technics in WordPress plugin development.

This may not make you feel good in the beginning but if you follow the tips provided here you will become a better  WordPress plugin developer in the long run.

Now it’s not easy and you will need to learn few things but it will make you better and like any professional craft you always need to sharpen your tools and be in the leading edge of the industry.

So lets begin:

  1. Start developing your WordPress plugins in OOP syntax
  2. Separate your code to small files each one preform one task
  3. Load any CSS / JS script only when your really need them on the page
  4. Improve your plugins security by using the Nonce and the settings API
  5. Don’t tamper with WordPress core actions, instead enhanced the existing one.
  6. Optimize your DB access using the WordPress built in DB objects
  7. Use Transient for saving information in the cache
  8. Follow WordPress hacking forums for know the new security that exist
  9. Always improve you code for security
  10. Don’t use pluggable functions if you need one code it for the beginning
  11. Add the option for other developers to extend your plugin by using hooks and filter inside your plugin code.
  12. Document to code or your API for better future development

Here are just few facts that you should know regards WordPress plugins and their developers:

  • Currently there are 27,669 in the WordPress plugins directory
  • More than 80% of them have big security issues.
  • Less than 60% of the plugins have not been updated with the new WordPress coding.
  • Most of plugins developers does not work at plugin development at full time job and earn most of income from their day job.

Now is not all bad, if you are serious about what you are doing, here is the good part:

  • The WordPress community and website are growing every day
  • Many big companies are starting to move their website the WordPress platform
  • Even though the WordPress platform is free to use almost every second company will need a developer to adapt the new website to their needs.
  • The need for professional developers is growing every day

So what do you decide to do?

Add your opinion to the discussion

Loading Facebook Comments ...

Leave a Reply

Your email address will not be published.