My first WordPress plugin (2021)

10/04/2021

Here we are with a new installment in my entrepreneurial adventures.

I have been programming for more than half my life—32 years to be exact, since I started at eight—although I’ve occasionally made choices that led me away from my constant passion: having “conversations” with machines through code. Geeky, right? Well, what I’m about to tell you is even stranger.

In web development, app creation, algorithm design, and more, I never “needed” to build a plugin. Writing specific functions was always enough—often replacing plugins entirely, at least when it comes to CMSs like WordPress, Joomla, Drupal, etc.

However, in my quest to write less code each day while prioritizing performance and speed, I turned to a site builder to accelerate web creation without sacrificing customization or loading times—especially one that wouldn’t add 500 KB per page and push 3G mobile loads past 10 seconds.

Oxygen Builder

That’s how I discovered Oxygen: a builder that’s far from user-friendly, in my opinion only suitable for those comfortable with PHP and JavaScript.

But to keep this brief (though it might not stay that way), I ended up needing to create a plugin to load my custom functions the correct way in WordPress.

You heard that right—how can I call myself a web developer if I’d never created a plugin until now? A plugin is simply a CMS feature I hadn’t needed to exploit before, and it represents an even simpler layer of web development (exclusively for CMSs, whether custom or third-party). High-level or low-level programming, object-oriented or not, has nothing to do with whether you’ve built plugins.

At its most basic, a WordPress plugin is just a folder and a PHP file that leverage WordPress’s hooks and APIs to run code that performs some action. Period.

It literally took me one minute to create—one of the easiest things I’ve ever done in code.

What does it do? It defines the set of functions I want to execute in specific scenarios.

If you’ve worked with WordPress, you know the “child theme” concept of your chosen template. In the “themeless” setup I now use, there is no theme—no parent, child, sibling, cousin, or any other relative. I have to get extremely creative to give my applications structure and personality. But the payoff is lightning-fast performance!

I won’t go into more detail now; I’ll explain where it’s running and why it works that way later. Just know it’s for the backend of the startup I co-founded and CTO—RealViewFit—in one of the apps that make up its cloud architecture.

Live long, and prosper!

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram