As part of our training at 34SP.com, support members with a specialist subject are encouraged to take a couple of hours a week for additional, focused learning related to their specialism. This allows us to gain extra knowledge and work on projects which better our understanding of our roles here.
As part of my training as a WordPress Specialist, I have been diving into code. By doing this I hoped to gain a greater knowledge of the WordPress API, and how hooks and filters work to aid in plugin development. The most logical way to learn this was for me to create my own WordPress plugin.
Earlier this year whilst sat at a table with my 34SP.com colleagues we were throwing ideas around, and the outcome was the idea of a virtual pet whose health is tied to the health of your WordPress site.
The project was very much to my tastes, as this idea combined my interest in learning code with my mild obsession with virtual pets and also allowed me to contribute some bits of artwork to the project. So I was very enthused to work on the plugin and enjoyed the learning process from start to finish.
I’ve dived into plugin development before for personal projects so I knew how to get started. The first iteration of ‘Wapuu Dashboard Pet‘ was very basic. I had gotten the plugin to a point where an image of Wapuu would sit on the admin dashboard, and depending on the number of pending updates on the site, the image of Wapuu would become progressively unwell.
Tim, our WordPress Platform Lead, offered his assistance with the project. We would sit down every few weeks and go through the code, and he would give me useful feedback on how I could improve it.
This was really useful information, as I had enough knowledge to make a plugin which worked, but Tim’s additional knowledge allowed me to fix my code to be less memory intensive, and he could explain clearly to me why certain things I tried didn’t work and offered several handy hints on ways to fix them. Having his input allowed me to build the plugin to a better standard than the original version.
Helpful tips came in many forms, from using PHP’s ‘switch’ statement to replace my long ‘if’ blocks of code, to using templates, and he also showed me how to make sure unnecessary code wasn’t loaded on pages where the plugin would not be displayed. These tips made Wapuu Dashboard Pet use less memory and gave me a better understanding of how to properly execute code on my website.
The final result was the new, released version of Wapuu Dashboard Pet, which can be found on the WordPress repository here: https://wordpress.org/plugins/wapuu-dashboard-pet/
Wapuu Dashboard Pet, in its current version, is a virtual pet for your WordPress admin dashboard. The more you fail to update your site, the sicker Wapuu becomes. Keep WordPress Core, plugins, and themes up to date to keep them happy.
The plugin also has an optional field allowing you to set up weekly email notifications, so if you’re someone who doesn’t log in to your site frequently, you can be prompted to update your site via email.
Development of the plugin is ongoing, and new features and improvements will be made as a continued effort in my additional learning time. For now, if you think the plugin sounds handy or just plain fun, I invite you to install Wapuu Dashboard Pet and see if the presence of a cute virtual pet on your admin panel encourages you to keep on top of those updates!