It’s crazy how seven versions of vibe coding later, I have a working WordPress plugin that directly addresses a problem. When people say, “Gen AI is useless, generating word salad that isn’t useful,” my first response is to clamp my mouth shut. Who wants to get in an argument with someone who is unwilling to put in the time to get results? Then, I wonder, maybe I’m the one who is doing something wrong. By now, it’s evident that if you aren’t getting results with Gen AI, you are not:
- Engaging in prompt engineering, prompt stacking, or bot stacking
- Providing the Gen AI tool of choice the context it needs to create the product
- Allowing yourself the time to interact with the Gen AI in ways that inform how it’s supposed to design a product
Or, I could be wrong. But I don’t think so. Here’s one easy example.
The Problem
I interact with several WordPress instances daily. On one of them, a colleague noticed the new user email notification wasn’t working as well as it could. The content of the email was brief, contained old information, and worse, included two web addresses (URLs) right next to each other. This was an astute observation on my colleague’s part, but since the email worked for thousands of users, and only a few people clicked the wrong link, it didn’t catch anyone else’s attention. That is to say, it didn’t catch MY attention. I had not connected the dots between that extra web URL and the issues that ended up in our support ticket system. D’oh.
The issue turned out to be WordPress. Working on a WordPress blog that sends newly registered users an email with password setting (or resetting) instructions is standard. The problem is that the old edits from a previous technologist had grown obsolete.
Exploring Solutions
So, with a sigh, I set aside other projects I was working on, and started digging around on the web. I relied on search engines, Gen AI, to try and find a solution. There were several, but the thought of switching out plugins (currently using the free version of a plugin you can pay $50 more a year for on a subscription <eyeroll>) was not enticing.
As a result, I revisited a solution I’ve been keeping in my back pocket but had yet to implement. I considered using FluentSMTP, a free alternative to the paid plugin that was installed. But I didn’t want to switch out plugins on a live site, and the thought of doing everything on a development instance was…more time-consuming. And, ultimately, a quick read of FluentSMTP’s website didn’t clarify whether it would even solve the problem.
Then, it hit me again, the obvious question. “Have you asked Gen AI about this?”
A Gen AI Solution
So, in as much detail as I could, I asked Perplexity, Gemini 2.5 Pro, Claude in BoodleBox Unlimited (since you can bot stack easily), “What’s the best solution for this?” And, surprisingly, the answer included one I hadn’t even considered:
Develop your own plugin.
Huh. So, I asked it to do just that. And it did.
how do I create a custom plugin for: [previous WordPress new user email]
It’s response was something along the lines of what appears below, and I’ve modified it to reflect the steps I went through. If you are unable to upload plugin files (zipped) to your WordPress, you may have to use file transfer protocol (FTP) or some other way to get your plugin into the right place on the server.
Creating a Custom WordPress Plugin for Email Modification
1. Add Plugin Header Comment:
- At the top of your PHP file, add the required plugin header information
- [Insert coded content]
2. Write Your Plugin Code:
- Below the header, add the functionality to customize the new user notification email
- [Insert coded content]
3. Create a Plugin Folder and PHP File:
- On your computer, create a folder containing a PHP file.
- Copy-n-paste what the Gen AI tool generates as the plugin code into the PHP file using a text editor and save it
- Compress or zip your folder with the plugin.
4. Upload and Activate the Plugin:
- In your WordPress admin panel, go to Plugins
- Once in Plugins, upload the zipped file containing your new plugin (a PHP file with the same name as the folder)
- Find your plugin (“Custom New User Email”) and click Activate
5. Test Your Plugin:
- Register a new user on your WordPress site to verify that the custom email is sent
Testing the Process
By version 1, the problem about duplicate URLs had been solved. By version 2, the problem of missing reset link was resolved. By version 3, I realized I should try to add more content to make it a little more explanatory for the user. By version 4, I hit a snag…all the content was smushed together. By version 6, I’d leveraged Codestral (also via BoodleBox Unlimited) to revise the code and put an HTML wrapper on the contents of the email.
By version 7, I had a working plugin that worked PERFECTLY and solved the problem.
Time Don’t Run Out on Me
I was working on a deadline project, so I needed to get this solved as quickly as possible. Now you may be asking yourself, how long did this take him?
Once I gave up finding a solution, and focused on vibe coding, about 15 minutes. Of course, I was NOT vibe coding for the first time. I’d already engaged in multi-hour vibe coding for other fun projects (remember, I can’t code worth a darn, don’t know any programming languages, and most importantly, do NOT want to learn how to code or pay someone else to code for me, although that’s what I did in this instance…but it was my Boodle Box Unlimited subscription that I use for lots of other projects, too).
For each version, I simply followed the directions BoodleBox gave me, and then uploaded to WordPress, deleting the previous version each time.
When I tested the solution, it worked. Of course, it’s a simple plugin. A question going around in my head, “Is this plugin secure? Did the code have any vulnerabilities? What am I missing that I simply don’t know about?” There’s a lot to consider. But I have a working solution right now…and that doesn’t mean I’ll stop trying to find answers to those questions and others.
Checklist
Here’s a Gen AI, comprehensive checklist for creating WordPress plugins with AI assistance (vibe coding):
WordPress Plugin Development Checklist for AI-Assisted Coding
🔍 Code Quality & Syntax
- [ ] Verify PHP opening/closing tags are correct (
<?phpand?>) - [ ] Check for syntax errors (commas, semicolons, brackets)
- [ ] Ensure proper array syntax (no stray commas)
- [ ] Validate function and variable naming conventions
- [ ] Confirm proper use of WordPress coding standards
🔐 Security Considerations
- [ ] Sanitize all user inputs using WordPress functions
- [ ] Escape all outputs (
esc_html(),esc_url(),esc_attr()) - [ ] Validate nonces for form submissions
- [ ] Check user capabilities before executing actions
- [ ] Avoid direct database queries when possible
⚙️ WordPress Best Practices
- [ ] Use proper hooks and filters
- [ ] Include complete plugin header information
- [ ] Follow WordPress naming conventions
- [ ] Use WordPress functions instead of PHP natives when available
- [ ] Implement proper text domain for translations
🧪 Testing Requirements
- [ ] Test with different user roles
- [ ] Verify email delivery functionality
- [ ] Check compatibility with latest WordPress version
- [ ] Test on both single site and multisite installations
- [ ] Validate with popular themes and plugins
📝 Documentation Needs
- [ ] Add inline code comments
- [ ] Create a README file with installation instructions
- [ ] Document any custom hooks or filters
- [ ] Include troubleshooting steps
- [ ] Specify minimum WordPress version required
⚡ Performance Checks
- [ ] Minimize database queries
- [ ] Use WordPress transients for caching when appropriate
- [ ] Avoid loading unnecessary resources
- [ ] Check for memory leaks in loops
- [ ] Optimize any custom queries
🎯 Functionality Verification
- [ ] Confirm all variables are properly defined
- [ ] Verify password reset keys are generated correctly
- [ ] Test email formatting (HTML vs plain text)
- [ ] Check that URLs are properly constructed
- [ ] Validate all conditional logic
🔄 Update & Maintenance
- [ ] Plan for future WordPress updates
- [ ] Consider backward compatibility
- [ ] Implement version control
- [ ] Create update notifications if needed
- [ ] Document any deprecated functions
⚠️ Common AI-Generated Code Issues
- [ ] Missing variable definitions (like
$key) - [ ] Incorrect WordPress function usage
- [ ] Overly complex solutions for simple tasks
- [ ] Missing error handling
- [ ] Incomplete implementations
🚀 Deployment Checklist
- [ ] Remove any debug code
- [ ] Set proper file permissions
- [ ] Test activation/deactivation hooks
- [ ] Verify uninstall cleanup
- [ ] Check for PHP error logs
Discover more from Another Think Coming
Subscribe to get the latest posts sent to your email.
