bobbingwide / wp-top12

Measuring effect on server response of the Top 12 WordPress plugins
Apache License 2.0
0 stars 0 forks source link

Top 10 themes - add logic to extract and analyse selected themes #17

Open bobbingwide opened 2 years ago

bobbingwide commented 2 years ago

It's been on my wish list for some time. Today at the WordPress Cambridge Meetup the topic is "My Favourite Theme". I've already written a poem entitled "My Favourite Theme". So I thought I'd talk about the new default theme for WordPress Twenty Twenty Two. Could this be my favourite theme for performance reasons? Yes and No! So then I started thinking about how people choose their themes, if they do, from wordpress.org.

9,000 themes to choose from and you want me to pick one?

And to work that out I felt it's time to extract the theme summary and produce reports.

Requirements

Proposed solution

bobbingwide commented 2 years ago

The WordPress API to list themes documented at https://codex.wordpress.org/WordPress.org_API is different to the documentation.

Consequently, I determined that it's not as easy to obtain the same figures for themes are for plugins. It's possible to get a complete list of the 9061 themes, using browse=updated. But in order to get the downloads each theme needs to be queried individually.

Additionally, the REST API doesn't appear to work for themes.

Approach chosen

bobbingwide commented 2 years ago

A Fatal error occurs when a themes json file gets created due to a theme not found error. This was the case with wporg_saved.themes.x3po-reflections.json

{"errors":{"themes_api_failed":["Theme not found"]},"error_data":[]}

which was created on 21 Feb and not updated on the last run.

bobbingwide commented 1 year ago

Well, this has been implemented for a while. What's missing is a listing of the most recent themes. It would be nice to be able to get a list of the themes added since the previous report. It's OK to require a little editing of the generated block.

bobbingwide commented 1 year ago

What's missing is a listing of the most recent themes.

Ditto for plugins.

bobbingwide commented 1 year ago

What's missing is a listing of the most recent themes. It would be nice to be able to get a list of the themes added since the previous report. It's OK to require a little editing of the generated block.

Another approach would be to generate a query block that lists the n most recent themes. This would work in wp-a2z.org once the themes routine has been run. The query block would be dependent on the theme's creation date being set to match that on wordpress.org