r/Wordpress • u/miquelon • 1d ago
Wordpress plugins using AI
Hello all. Longtime Wordpress user, I often find myself searching for plugins that never really fully match what I want to achieve, or that are either too expensive or bulky. Lately, I've been using AI to generate small plugins for features I didn't have, and must admit I am impressed by the results. Has anyone else been dabbling in plugin generation through AI, and how much of a risk could this be to my projects?
Here's a simple example : create a ticker widget that selects posts with the DD / MM but not year of a group of 2000 posts that have been formated with "DD / MM / YYYY - Topic" within a specific post category ...
6
u/bluesix_v2 Jack of All Trades 1d ago
Have you not visited this sub over the last 6 months? It’s a daily topic of conversation lately.
4
u/cban_3489 1d ago
WordPress.org has a plugin called Plugin Check. You can test if your plugin is safe with that https://wordpress.org/plugins/plugin-check/
10
u/MadtownLems Core Contributor 1d ago
> Has anyone else been dabbling in plugin generation through AI
Yes, obviously. Basically every WP developer.
> how much of a risk could this be to my projects?
Depends on the type of stuff they're doing, and your knowledge of coding and security practices.
1
u/NakanoNoNeko 1d ago
I trust a read-only ticker much more than generated code that changes posts or handles payments. For yours, test 01/02, 02/01 and February 29, and check that it uses the title's date rather than the publication date. Working code can still select completely wrong posts.
2
u/izjustme2029 1d ago edited 1d ago
I basically created my own theme, builder, and a whole suite of plugins for SEO, security, performance, analytics, language switcher, and business-specific ones for local (DNI Number swapper with Twilio) and e-commerce (floating cart, better checkout, swatches, etc)
For me since I started doing this I kind of re-engineered everything I loved as a designer and learned to code through it as well. It feels pretty much limitless sincerely. However, I wouldn't say it's easy or can be done by people who don't have deep knowledge of code and design. And you gotta be ready to continually maintain and upgrade it. But sincerely, rather this than the way I worked for 10+ years before... Testing and paying for a theme, plugin, and builder for all you need, then learning through experience if they're good or not. However at the same time I wouldn't know if they're good or not without this.
Anyhow... I'd say you need to start small and do stuff that isn't too important or sensitive, like what you said about the clock. Then you can take on bigger and bigger challenges. I started with a GMB posts carousel maybe a year ago. Since then, well... It's been a ride.
2
u/Frank_MakesIt 23h ago
the main risk is the code itself. ai plugins often skip nonce checks, capability checks and escaping, so a form or ajax handler can end up open to anyone. ask it to review those three, then try the feature logged out.
2
u/jdarshad 22h ago
I recently started using AI for small custom theme adjustments but sometimes it's way more than you ask for so I simply use AI to check my code and theme code itself. Recently I was working on a theme and somehow the whole top menu was added without ul just directly jumping into li. 😄 Apparently it was supposed to be done by some setting but this is basic html level one thing.
3
u/kemalios 1d ago
The generation is the easy part. The risk shows up a year later, when a PHP or WP update breaks it and nobody remembers what it did or why. Keep each snippet small, commented, and in version control. I write code with Claude Code daily and the ones that bite me are the old ones I stopped looking at.
2
u/Calm-Republic9370 1d ago
I have been building a plugin for about 6 months with AI. it's pretty significantly sized. I purposely avoid overt security holes or things I think would be a security issue.
I'm going through the Worpdress store plugin process to have it added. You would be suprised at the number of features that are flagged as security holes which have nothing to do with anything you think is a security issue.
1
u/brisbane_tee 1d ago
Generate in Claude and add with snippet plugin
1
u/showbizusa25 1d ago
AI-generated plugins are fine for small tasks, but I'd never deploy one without reviewing the code.
For your ticker, I'd check input validation, output escaping, and query performance across those 2,000 posts.
The biggest risk isn't AI writing bad code. It's trusting code nobody has reviewed.
1
u/XInsects 1d ago
I'm no developer, but have a commercial WP site, and yes I've been replacing plugins with my own versions using AI. Amazing results, very efficient and I love having them do exactly what I need without all the bloat. Often I just need something specific from a plugin, without all the other crap it offers. From five plugins, I cut the file quantity down from something like 6000 to 20.
1
u/mystique0712 1d ago
Using AI to generate plugins definitely carries risks, especially around security and stability.
You'll want to thoroughly vet any AI-generated code for vulnerabilities and ensure it integrates cleanly with your existing setup.
1
u/Miserable-Body-8015 1d ago edited 1d ago
Even if you are not submitting your plugin to wordpress.org, you can tell Claude to read and follow some of the sections from the developer guide:
https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/
- All of the plugin-basics section URLs.
- All of the "Plugin Security" section URLs.
- Plugin Readmes.
- And any other section that is most relevant to your plugin.
After a build, check the readme.txt with "readme-validator." Then run plugin-check after installing the plugin. Ask Claude to fix all of the warnings and errors.
For example, I created this plugin that was accepted by wordpress.org
https://github.com/TurtleEngr/WP-turtle-template-form-knitter
The spec/ directory includes most of the prompts I used.
0
u/[deleted] 15h ago
[removed] — view removed comment