Maintaining a WordPress Plugin

It’s about 2 years that WP Mail Logging is available in the plugin repository. In the following I want to talk about my experience with making a WordPress plugin.

Scaffolding

I always wanted to learn more about WordPress development and WordPress Plugin Development in first place since I started my first Website with WordPress in 2007 or so and misusing it as an CMS (which it wasn’t yet at this moment ). I was fascinated by the fact that it was possible to write your own scripts on top of WordPress witch just 2 things: actions & filters. You could hook into most functionality in the core and make use of this powerful API – so I wanted to try it for myself. In parallel I was fronted with WordPress in my job too, when I built a platform allowing us to deliver downloads to our customers based on their contracts. When implementing a notification module and sending mails to dummy users of WordPress while development I realised that there was no easy way to track outgoing mails of WordPress.

It started with a single file, the wp_mail hook and the debug log – later I saved the entries in the database. I think the first version of WP Mail Logging did not even have a page to view these entries. I wanted to make this plugin clean and OOP from the first day. Since I

  1. did not understand the hook concepts of WordPress well at this point in time
  2. had limited php programming skills
  3. did not find open source plugins that were programmed in the way I understood OOP

I had trouble implementing this on my own – happily I discovered the WordPress Plugin Template from Micheal Simpson. It gave me a perfect plugin scaffolding and well documented implementation and usage details. Without it I might have stopped spending my free time on this plugin.

Development

From the first day of development I wanted to use git and github – which was my first project with git. Well it wasn’t easy to understand git: git But I understood the need to get this powerful tool right, which made me working on this. After some month working alone on this project something changed: I noticed users were actually using this plugin and raised tickets and feature requests on WordPress Support Section and GitHub as well.

In August 2014 tripflex contributed a modal window to view the mails in a nice way – I never spoke to him before. He also recommended to use semantic versioning for the plugin. Another guy wvega made a pull request to remove debug statements and little mistakes in the code. This was actually the reason I shared the plugin on GitHub and I described that I appreciate any contribution in the Readme.md in the root of the plugin. Although I was really impressed that other developers are actually reading, reviewing and improve my code. I want to thank these guys again now!

Some feature requests required a change in the database scheme. So I introduced upgrade routines for users that install a new version of the plugin to move their content to the new database schema. I’m actually not remember this situation well enough to talk about the reason why this upgrade ended in a reinstallation and loss of data for current users. That was when I realised that people are actually rely on the plugin and expect a bug-free usage.

Resumé

The plugin is just a little tool for a specific use case. Nevertheless I learned how to use git & github, experienced help from other developers and improved my knowledge about WordPress and php.

Today WP Mail Logging has 1,000+ active installations which makes me kind of proud since I never expected that so much people would use it. It started with a single file, the wp_mail hook and the debug log – now it has more than 1800 lines of code although the intention is still the same: keep track of outgoing mails in WordPress.

  2 comments for “Maintaining a WordPress Plugin

  1. 22. February 2016 at 19:10

    Hi, Thanks for the nice tips on your site. I was able to get help from your fail2ban write-up and it helped me configure mine.
    Your writings are quite good technically but it seems you need some help with the English grammar to make it more attractive. If you like, I can help you proof-read some of your posts.
    By the way, I am a Christian too 🙂

    • No3x
      22. February 2016 at 20:25

      Hi Steve,
      I really appreciate your feedback. Of course my english writing is not the best but I try my best. It would be great if you proof-read some posts. I thought you are Steve?

Leave a Reply

Your email address will not be published. Required fields are marked *