Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only store info for relevant standalone plugins in the transient cache #1573

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

mukeshpanchal27
Copy link
Member

Follow-up on #1562

The current API query https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[author]=wordpressdotorg&request[tag]=performance&request[per_page]=100 is returning some unrelated plugins like Plugin Check (PCP) and SQLite Database Integration. In the future, if anyone else uses Performance as a tag, it will also be added to our transient. However, we only need the standalone plugins defined in perflab_get_standalone_plugin_data().

I’ve also moved the array definition for $fields after the cache check, as it's redundant in the cached version.

@mukeshpanchal27 mukeshpanchal27 added [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only labels Oct 1, 2024
@mukeshpanchal27 mukeshpanchal27 self-assigned this Oct 1, 2024
@mukeshpanchal27 mukeshpanchal27 added no milestone PRs that do not have a defined milestone for release and removed no milestone PRs that do not have a defined milestone for release labels Oct 1, 2024
@mukeshpanchal27 mukeshpanchal27 marked this pull request as ready for review October 1, 2024 11:48
Copy link

github-actions bot commented Oct 1, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mukeshpanchal27 <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>
Co-authored-by: felixarntz <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mukeshpanchal27 Great catch!

PR looks good, though one recommendation to improve performance.

plugins/performance-lab/includes/admin/plugins.php Outdated Show resolved Hide resolved
@mukeshpanchal27 mukeshpanchal27 merged commit 5952d55 into trunk Oct 2, 2024
14 checks passed
@mukeshpanchal27 mukeshpanchal27 deleted the fix/follow-up-1562 branch October 2, 2024 05:01
@felixarntz felixarntz changed the title Performance Lab: Query only required standalone plugins to get information Only store info for relevant standalone plugins in the transient cache Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Enhancement A suggestion for improvement of an existing feature
Projects
Status: Done 😃
Development

Successfully merging this pull request may close these issues.

4 participants