Welcome to the final part of our series on building a WordPress plugin! Starting as a complete beginner, we’ve come a long way over the series and picked up the beginnings of what could be some truly useful skills – as well as a new-found appreciation of the hard work that goes into actually putting a plugin together.
To wrap things up, we’ll highlight some important plugin topics that we didn’t quite get to, and suggest a whole slew of useful resources for taking things further on your own. We’ll also provide a handy list of classic WordPress plugins that are well worth exploring as a learning exercise.
However, before we do all that, let’s take a quick trip through the main areas we’ve touched on over the series, and give ourselves a reminder of some useful resources introduced along the way.
What We’ve Covered In The Series
Considering we started pretty much from scratch, we managed to cover an impressive array of topics while putting together our rudimentary random quotes plugin. The trusty WordPress Plugin Handbook was a constant companion throughout the series, and we also leaned heavily on the following excellent online tutorials from elsewhere:
- MainWP’s bare-bones guide to creating a WordPress plugin.
- Daniel Pataki’s guide to the WordPress Plugin Boilerplate framework.
- Chris Wilcoxson’s guide to the WordPress Plugin Boilerplate, and in particular his sample project on Github.
- Guillaume Kanoffi’s tutorial on creating a WordPress plugin.
Okay – so let’s step through what we actually built using these resources. In the first part of our series, we introduced key local tools such as DesktopServer, and threw together an incredibly basic working plugin just to prove that the basic mechanics of getting something working weren’t too scary.
In part two of the series, we introduced the WordPress Plugin Boilerplate that we’d be using throughout, and explored its basic structure and conventions in the context of setting up our own plugin. In part three, we finally started breaking out some code and set up our own custom post type to handle user content.
Part four of the series was all about actually displaying user content on the screen using the power of shortcodes. Finally, in part five, we returned to the back end and sorted out some basic admin settings for our users.
Areas Of The Plugin Handbook To Explore Further
One way or the other, we hit an awful lot of the major parts of plugin development throughout the first five parts of the series, and hopefully, there were plenty of useful jumping off points for you to explore further. However, there were a few pretty huge areas we skipped blithely past along the way. Let’s point you in the right direction of some of those before we go any further:
- Security. The approach we took to security in developing our basic plugin could perhaps be charitably described as “loose”. In the interests of brevity, we skipped past a lot of security essentials that are introduced in the Plugin Handbook section on security. Be sure to go through them in depth as you start tackling your own projects.
- Internationalization. This was another crucial area that we glossed over. Fortunately, the WordPress Plugin Boilerplate tees you up nicely for getting this right from the get-go by default. Follow up with a proper read of the internationalization section of the Plugin Handbook, and you’ll be ready to tackle this topic with confidence.
- Listing on WordPress.org. If you’re tackling a plugin project in earnest, you’ll want the satisfaction of being able to share it with the world. The WordPress.org handbook section is essential reading in this regard, particularly the proposed new Plugin Directory Guidelines on Github.
As you can see, there are plenty of large areas left to explore as you start mastering plugin development, and the Plugin Handbook is reliably going to be your first stop for most of them. Be sure to read it from cover to cover!
4 Classic Plugins That Reward Closer Study
Once you’ve gotten your head around the basic moving parts of plugins generally, you’re in a great position to turbocharge your learning by picking apart real live working examples.
The beauty of WordPress’ licensing model means you’ve got pretty much complete access to the innards of any plugin that takes your fancy, but the four below are excellent starting points for beginners:
- Hello Dolly. There’s nothing particularly revolutionary going on behind the scenes of this classic, but this plugin still ships with every copy of the software and is a useful example to poke around while getting your feet wet.
- Now Hiring. If you’re going down the WordPress Plugin Boilerplate road, Chris Wilcoxson’s working demo on Github is an essential learning resource.
- Members. User roles was one of the topics we shied away from in the series, but examining Justin Tadlock’s Members plugin is a great way of taking a deep dive on the topic. You’ll also find excellent documentation and background tutorials available covering its use.
- WooCommerce. This isn’t one you’ll be getting through in a hurry, but WooCommerce is well worth poking around in to get a feel for how a genuinely huge and transformative plugin is put together and structured by the best in the business.
Naturally, the four selections above are just personal suggestions. There’s plenty to be learned from pretty much any plugin when you’re starting off. Simply pick some of the ones you get the most daily use out of, and start diving in!
The field of plugin development is a genuinely enormous one, and we’ve inevitably just scratched the surface in this series. However, we’d like to leave you with some suggestions for taking your skills to the next level. All of the following resources come highly recommended:
- Anything by Josh Pollock. Josh Pollock doesn’t just crank out incredibly useful developer-led articles here on Torque, you’ll also find him discussing general development topics, and running excellent courses elsewhere on the web.
- Object-Orientated Programming (OOP). We glossed over this aspect in the series, but the WordPress Plugin Boilerplate strongly encourages proper use of OOP. Codecademy’s object-orientated PHP course is a handy free intro in this regard. If you’re prepared to spend a small amount of money, both Udemy’s Build an OOP Site course and Brandon Savage’s Mastering Object-Oriented PHP book are also well worth a look.
- Learn Plugin Development with Pippin Williamson. You’ll need to shell out a few cents to access all of the material, but there’s a huge amount of useful content available over at Pippin Williamson’s site. In terms of learning from an incredibly experienced plugin developer, you couldn’t be in better hands.
Whether you’re going to seriously look at developing your own plugin or not, acquiring even a small understanding of their inner workings does wonders for your overall knowledge of WordPress as a platform. We hope that this series has shone some light on what’s going on behind the scenes!
We strongly recommend having a go at putting together your own basic plugin, even if it’s just as a learning exercise. With just a little time and patience, it’s possible to cover a surprising amount of ground, and the follow-on resources we’ve listed in this wrap-up piece should be enough to point you down more advanced paths.
If you’ve any comments on the series as a whole or wish to point other readers in the direction of useful resources that we might have missed above, we’d love to hear from you. Get in touch via the comments section below and share your thoughts!
Featured image: geralt