So you want to create a WordPress plugin the right way…
I can't tell you the number of people that show up at WordCamps, meetups, on my blog, or meet me in person who want to get involved in writing a WordPress plugin. But the challenge is knowing how to do it the right way.
After all, no one wants to experience the feared backlash of someone looking over their code, only to be told they did it wrong. Right?
Well, here's some good news – we've all been there. We've all created code we didn't like. We've all created code that caused us, just a year or two later, to wonder what we were thinking when we wrote it.
So what do you do?
Learn from the Right Folks
Not every person who writes code is someone I'd want to follow. Not every plugin that's been downloaded a lot is coded in a way I'd want to emulate. So what I'd like to do here, in this short note, is to point you to the tutorials I find that are really helpful.
My criteria is pretty simple:
- Are the developers who wrote them constant learners?
- Are the developers who wrote them trusted in the community?
If you're new to the community, it could take you years to figure out how to answer these questions. Thankfully, I'm going to answer it for you.
Three of my favorites that I'd like to recommend to you are Pippin Williamson, Tom McFarlin, and Jason Coleman.
Some Great WordPress Plugin Tutorials
This course is open to all premium subscribers to Pippin’s Plugins and memberships start at just $6 per month.
- Introduction to WordPress Plugin Development 101
- Plugin Development 101 – What Makes a Plugin?
- Plugin Development 101 – General Best Practices
- Plugin Development 101 – An Intro to Filters
- Plugin Development 101 – Registering a Custom Post Type
- Plugin Development 101 – Intro to Short Codes
- Plugin Development 101 – Intro to Loading Scripts and Styles
- Plugin Development 101 – Introduction to Adding Dashboard Menus
These are worth going thru – even if they require a site membership. Trust me on that.
Pippin also has another training set available here. It's a first pass, and some people like to do it first. It's free.
- How to Begin Writing Your First WordPress plugin
- Structuring Your First WordPress Plugin
- Writing Your First WordPress Plugin Part 3
- Writing Your First WordPress Plugin Part 4
- Writing Your First WordPress Plugin Part 5
- Writing Your First WordPress Plugin Part 6
- Writing Your First WordPress Plugin Part 7 – Final
Tom McFarlin has a video course, but again, it comes for a fee. Still – well worth signing up for. You can find it at Tuts+. Tom also has some boilerplate available when you're just getting started with writing a plugin.
Some Great WordPress Code
Now to be honest, there are tons of great folks that write wonderful code. So sending you Jason's way is just my pick. But since I send a significant amount of traffic to his site because of his membership plugin, and because he has all sorts of amazing code available on github, I figured you might like to check out his code.
Sometimes just looking over what people are doing can really help you take your next steps.
Your Final Steps
Once you've written your code, there's one last step I'd strongly suggest you take. Now, this is tricky. You have to have developed some rapport with the right folks and developed some trust, but if you have, get someone to look over your code. Someone who's someone.
Sometimes that might mean taking someone to lunch. But trust me, it'll be worth it.