Submitting my first WordPress Plugin, Pt. 1

Kirk Clarke
Nerd For Tech
Published in
3 min readJan 10, 2022

--

Just some thoughts on my experience and the process

I have quite a few years of WordPress experience under my belt, though I’m far from an expert. Especially since WordPress has changed a lot since I was first introduced to it during a short summer internship in 2009.

Up until a couple of years ago, I’ve only ever made modifications and customizations to plugins and templates for myself or others, and though I’ve had the ambitions to make a theme and a plugin for distribution, I never leaped. (I’ve even purchased, but have yet to finish a couple of courses from Udemy that cover plugin development). I believe like a lot of things in my life, the idea of doing something can sometimes seem overwhelming, and doubt creeps in, which ultimately makes starting seem impossible. Even though it’s easier said than done, never let doubt stop you from pursuing something. It’s most often better to fail (and hopefully learn) than never trying at all.

My first ‘real’ plugin was technically born in 2020 when I pieced together a custom plugin to modify the appearance of a password-protected page for a friend. It was nothing crazy, they just wanted to allow a user to fill out a form to request access to their freebie library.

Allows a widget to be added to the default WordPress password-protected page.

Now fast-forward about a year, I finally started turning the plugin into something that I could submit to the WordPress Plugin Directory. I recommend reading the Detailed Plugin Guidelines and Planning, Submitting, and Maintaining Plugins. After updating the code a bit, I submitted my files/plugin for review. It was pretty straightforward and took about a day for them to get back to me via email regarding the items that I needed to fix. I was dinged for having an Incorrect Stable Tag and Generic function/class/define/namespace names.

Incorrect Stable Tag

This was an easy fix, all I had to do was make sure the version listing in my main plugin file and the stable tag in the readme.txt were the same. Because this was for initial development I went with following this specification and used 0.1.0.

main plugin file
readme.txt

For information on Semantic Versioning (SemVer), visit this site.

Generic function/class/define/namespace names

As stated by the plugin review team:

All plugins must have unique function names, namespaces, defines, and class names. This prevents your plugin from conflicting with other plugins or themes. We need you to update your plugin to use more unique and distinct names.

Don’t try to use two (2) or three (3) letter prefixes anymore. We host nearly 100-thousand plugins on WordPress.org alone. There are tens of thousands more outside our servers. Believe us, you’re going to run into conflicts.

For this, I went with expanding the names of my plugin’s functions. My plugin is named Customize Private & Protected, so in some places, I went from cpp -> customize_pp_plugin for the prefix.

While other parts of my code were missing a prefix altogether.

After making those fixes, all I needed to do was zip my files and reply to the email with my plugin as an attachment. And thankfully, about 30 minutes later I was notified that my review was successfully completed! In my next post, I’ll go over a few items regarding using Subversion (SVN) and things to watch out there. Thanks again for reading, and let me know your thoughts on the plugin.

WordPress Plugin: Customize Private & Protected
https://wordpress.org/plugins/customize-private-protected/

--

--

Kirk Clarke
Nerd For Tech

Senior Web (UI/UX) Designer & Engineer. Loves learning new things and solving problems. https://kirkclarke.com/ https://twitter.com/kclarkedesign