Delivering Results With AI – Can ChatGPT Really Create Your Next WordPress Plugin?

Social media is abuzz right now with the truly amazing scope of creative problem-solving possibilities that AI solutions can provide, for their fast speed of delivery and capability to fine tune user responses until you effectively land on an answer/solution that works for you.

The undisputed leader of the current global hype for AI is ChatGPT, which whilst in its free beta testing phase is allowing the general public to try without restriction or cost.

A lot has already been written about the impact that this technology will likely have for areas like education, but what we within the WordPress For Education And Training Group had been most interested in are the practical applications of solutions like ChatGPT to enhance the abilities of the WordPress developer. (Notice we said ENHANCE and not REPLACE in that sentence! This is a hugely important distinction which we will touch on again a little later…)

To start we wanted to see whether ChatGPT could indeed create a standalone plugin for WordPress by giving it the simplest of challenges we could think of:

“Write a PHP plugin file for WordPress which allows a logged in user to show or hide the WordPress Admin Bar by clicking on a button.”

And sure enough, the API was able to provide to us with a PHP code snippet that could be contained within a plugin file to install onto a test site within our wp-content/plugins folder.

The test was not wholly successful however because ChatGPT’s response seemed to get a few ID names within WordPress wrong, perhaps because the AI had gathered this information from out-of-date sources for historical versions of WordPress prior to 6.0.

So with some bug fixing on our side, the solution was made and success was achieved:

But this experience seems to illustrate what is likely going to occur with developer time if too much reliance is placed on AI in its premature state.

The world is always going to need developers as either problem solvers or creative pathfinders, to be making the decisions on when such technologies can be safely implemented to generate value, and when the risks require us to proceed down a more trusted and consciously derived path.

But having said that, the problems we’re alluding to really only present themselves because the AI is currently trying to work within the confines of human-generated coding languages, which in themselves provide the scope for errors and unintended ramifications!

Fireship’s recent video covering this topic provides some very interesting thoughts for the future, with the idea that AI might eventually move towards a state of replacing interpretive languages and instead become reliant on its own ability to develop executables built on machine code, which are fully optimised to take full advantage of the hardware onto which they are installed!

Does this mean that we as digital developers may in the far distant future only pick up learning and using languages like JavaScript as a throwback to old times?! Like a classic car enthusiast trying to get his 60s muscle car to start whilst their hydrogen-powered hover vehicle floats on the driveway…

It will most certainly be very interesting to see what path this technology takes technical development professionals in the future.

Share your own experiences with using AI so far, and if you work in the education and training space let us know where you think solutions like ChatGPT will eventually take us.

(Image created by DeepAI using the term ‘A web developer creating a WordPress plugin on a desktop PC’)

Related Posts

WordCamp Europe 2023 Reflections

WordCamp Europe 2023 Reflections

So the WPETG team have been on the road (or more strictly speaking, in the air!). WordCamp Europe 2023 took place in bustling Athens, Greece - so we jumped at the chance to connect, learn and collaborate. After so much disruption through the COVID pandemic, it was...

Creating a Scenario-Based Learning Tool with OpenAI’s ChatGPT API

Introduction Artificial Intelligence (AI) has revolutionized the way we think about technology and its applications. One of the most promising developments in this field is the emergence of chatbots, which use natural language processing (NLP) to communicate with...