r/Wordpress • • 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 Upvotes

35 comments sorted by

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.

1

u/miquelon 1d ago

I guess not.

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/

1

u/miquelon 1d ago

Oh thank you !

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.

2

u/Ringlau-Temilolu 1d ago

for a read-only ticker like OPs example though, is the main worry just unescaped output or bad database queries?

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.

1

u/miquelon 1d ago

So far it's done a remarkable job as the content has already been standardized in that category.

1

u/NakanoNoNeko 1d ago

That makes sense, having the dates standardized already removes a lot of the guesswork. A small read-only feature like yours seems a much better place to try generated code than checkout.

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/commentbelowhere 1d ago

Interesting what kind of things are they flagging?

1

u/Calm-Republic9370 1d ago

Well they have a validator. It covers a lot of things I'm not familiar with, but very WordPress and php specific. I'm sure it's going to be specific for every single plugin and so my issues might not be yours.
The company I'm with has been around long enough for them to take the plugin pretty quickly; so I didn't actually look up if you can run it through some kind of check before hand.
But I did have claude do a lot of security checks before hand.
It's a lot of work - for the AI.

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/labanjohnson 1d ago

What are the unspoken risks there?

2

u/showbizusa25 22h ago

The risks aren't always obvious. A plugin might work perfectly but still have missing permission checks, unescaped output, unsafe database queries, or exposed AJAX endpoints.

AI can generate working code without catching those issues. That's why I'd review the security controls, not just whether the feature works.

1

u/fredy31 Developer 1d ago

Your code written with ai is a mishmash of a bunch of prompts, doesnt follow standards and its just all around shit that's the problem

1

u/labanjohnson 1d ago

That's what good engineering and quality control is for. Just because ai is a worker doesn't mean you lower your standards, any more than you would with a human, and you can demand conformity to higher standards and build accordingly.

1

u/fredy31 Developer 14h ago

I know that. But i dont expect people that say i coded this with ai to have engineering and quality control of the code.

1

u/labanjohnson 13h ago

It boils down to the standards of the individual behind the screen. Maybe that's what we should be discussing. What standards should a coder be upholding today, be it ai or human or some hybrid solution? Not only for security, that's important, but good software architecture, too, making the best leverage of the WordPress platform and not reinventing the wheel.

1

u/showbizusa25 8h ago

AI-generated code should meet the same standards as human-written code.

For WordPress, that means proper permission checks, input validation, output escaping, and using existing APIs.

Code reviews, testing, and maintainability matter too. If you can't understand, secure, or troubleshoot the code, it shouldn't be in production.

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

1

u/Wordpress-ModTeam 12h ago

That’s not what OP meant at all.