In December, ChatGPT surpassed the one-million-user mark, and Twitter is full of questions and creative applications for the AI-powered chatbot. The language model, created by OpenAI, runs on GPT-3.5, a set of models trained on text and code before the fourth quarter of 2021. The model has a dialogue format that allows ChatGPT to “answer follow-up questions, admit mistakes, refute incorrect premises, and reject inappropriate requests.” While some predict the end of search engines and pronounce the death of human-generated writing, others are fascinated by the potential of artificial intelligence systems to fundamentally change the creative process. WordPress developer Johnathon Williams explored this when he asked ChatGPT to create a WordPress plugin. Normally, creating a plugin requires a certain level of technical skill. Williams showed that, with a little expert guidance, ChatGPT can dramatically reduce the time it takes to extend WordPress. Williams installed the plugin and found that it worked on the first try. Although he didn't save the prompt from this first attempt, he posted a gist of the generated code on GitHub. In a second attempt to create another plugin, he used the following prompt: Create a custom WordPress plugin called “Big Daddy Media” that removes images older than one year from the media library. OOP. Custom admin screen. Delete with a button. Log the full URL of all deleted media files. Williams said that although he got mixed results with his prompts, he got the best results by asking ChatGPT to generate complete functions rather than specific filters or actions.
ChatGPT from Open AI can generate a complete WordPress plugin based on a simple description. Watch it work: pic.twitter.com/LZQbxFq0aP
– Johnathon Williams (@johnofhousejohn) December 6, 2022
Naturally, we were curious too and gave it a simple prompt to create a WordPress dashboard plugin showing the best-selling products: create a custom WordPress plugin called “Top Orders” that displays WooCommerce’s best-selling products in the WordPress dashboard. Here’s the result: In theory, with additional training on plugin best practices and common architecture, ChatGPT could be used by people of all skill levels to extend WordPress creatively. “Very soon, describing the WordPress plugin you need in ChatGPT will generate a new plugin faster than searching for an existing plugin in the plugin directory,” Williams said. “Of course, this won’t apply to every type of plugin. But for relatively simple plugins that perform well-established tricks… very soon, you’ll probably read ‘now’.” P.S. This blog post was written using ChatGPT 🙂



