Skip to content

Use a single WordPress.org API request to get plugin information #1542

@felixarntz

Description

@felixarntz

Currently, the Performance features screen makes individual plugin_information queries to the WordPress.org API, which is rather inefficient, especially the more plugins we have. We can enhance this by instead using a single request as follows:

https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[author]=wordpressdotorg&request[per_page]=100

While the WordPress.org Plugins API does not support passing multiple specific slugs (which would be ideal), this is a decent workaround: Since all our plugins use the wordpressdotorg author, we can safely assume our plugins are included in that list.

This will obviously return many other plugins too, but we'd be able to filter out just the plugins we care about. While this request returns too much data, it's still far more efficient than making all those individual requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueIssue particularly suitable to be worked on by new contributors[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin only[Type] EnhancementA suggestion for improvement of an existing feature

    Type

    No type

    Projects

    Status

    Done 😃

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions