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:
- Start developing your WordPress plugins in OOP syntax
- Separate your code to small files each one preform one task
- Load any CSS / JS script only when your really need them on the page
- Improve your plugins security by using the Nonce and the settings API
- Don’t tamper with WordPress core actions, instead enhanced the existing one.
- Optimize your DB access using the WordPress built in DB objects
- Use Transient for saving information in the cache
- Follow WordPress hacking forums for know the new security that exist
- Always improve you code for security
- Don’t use pluggable functions if you need one code it for the beginning
- Add the option for other developers to extend your plugin by using hooks and filter inside your plugin code.
- 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?