WordlePress - a silly (and very difficult) game for WordPress developers - Ross Wintle

WordlePress – a silly (and very difficult) game for WordPress developers

Announcing (or re-announcing) WordlePress: a silly function-name guessing game for WordPress developers (and anyone else stupid enough to try).

This post serves as the help page/instructions for WordlePress until I get some proper help up on the actual WordlePress site.

Earlier this year, the daily Wordle puzzle was all the rage. And early on I suggested that “WordlePress” should be a thing. So I made something that may fit the name. Here’s how it works:

Background

WordPress core has over 900 global PHP functions with four underscore-separated “parts”, such as `wp_get_attachment_image`. This is a “function”, and each of the parts is a “word”.

Aim of the game

Each day (changing at midnight UTC) WordlePress selects a new 4-part function for you to guess. You need to guess all 4 “words” correctly to win.

There is also the option to guess a randomly picked function name from the list to practice.

When you win, or give up, the answer is shown and the documentation for the function is linked. So this is an educational tool too!

The function list is from (I think) WordPress 5.9, released in January 2022. If it helps this is just after the first beta of the full-site editing feature was added to core.

How to play

Enter your word guesses in the four input boxes and click “Guess”. The result boxes will tell you how many of them are correct:

  • A green box means you got the right word in the right position
  • An orange box means you got a word that is in the function, but it’s in the wrong position

The aim is to get all four result boxes to green!

Words and suggestions

The game helps you by only allowing words from the list of functions to be entered. There are 695 valid words and the game shows you how many you have not guessed with.

To further help you, there is a “Suggest” button. This will choose random words from the unused words list for you and put them in the input boxes. If you have correctly guessed a word this is kept in the correct place.

You will notice that the input boxes sometimes have coloured highlights:

  • Red: You tried this word before and it’s not in the function
  • Orange: You tried this word before and it’s in the function, but you didn’t get the right place
  • Green: You’ve found this word in the correct place

The game saves your progress across reloads but does not keep any player stats yet.

Limitations/roadmap

First of all, no, I’m not a designer. The game works but the UI needs improvement. I’m well aware of that. But it’s still perfectly playable for now.

I’ve hacked this together fairly quickly (it’s not my finest code!) and some of the interaction is quite complex so I’m making not claims about the accessibility of this game.

I’ve had a request to add a color-blind-friendly mode, and that will probably come soon.

I’d love to add some player stats and an option to share your result to social media.

Technology

This game is built on a single HTML page (with some JS files loaded too) using vanilla CSS and a combination of vanilla JavaScript and AlpineJS.

It’s hosted on Netlify.

It’s been hacked together quickly so is not my finest code and needs some refactoring!

If you’re interested I previously wrote some stuff about how I made this with some “interesting” stats on WordPress function names.

Contact/suggestions

If you have feedback or suggestions then please drop me a line – probably on social media. You can find all my details at https://rw.omg.lol/. Just bear in mind this is a fun side-project, don’t expect first-class support.

Thanks for playing! I hope you have fun and learn something.