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

Confusing WordPress capability calls with database lookups #25

Open
6 tasks
martymi opened this issue Oct 7, 2024 · 0 comments
Open
6 tasks

Confusing WordPress capability calls with database lookups #25

martymi opened this issue Oct 7, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@martymi
Copy link

martymi commented Oct 7, 2024

  • [x ] I've read and understood the contribution guidelines.
  • [ x] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

Great plugin! Running into an issue where it is identifying hundreds of autoload options that don't exist. After reporting the issue to the UpDraft devs we have the following response to consider:

https://wordpress.org/support/topic/page_capability_updraft-options-group-is-called-regularly-but-seems-to-be-not-ei/#post-18058863

  • This is apparently a bug in the plugin “AAA Option Optimizer”, which is confusing WordPress capability calls with database lookups. Here you can see the capability lookup in our code: https://plugins.trac.wordpress.org/browser/updraftplus/tags/1.24.6/options.php#L20 . If you install a database tool like “Query Monitor” which shows all database lookups, you won’t find any database lookups for this key (page_capability_updraft-options-group) – except from the “AAA Option Optimizer” plugin itself.

  • updraft_jobdata_* – these keys are used inside backup jobs. So, you’ve presumably run a backup (or visited your UpdraftPlus settings page). They’re not looked up on any front-end pages, because UpdraftPlus is a back-end tool and doesn’t run on the front-end of your site. As such, the Optimizer plugin could do with improving here by not showing all option lookups as if they were the same – the context of the lookup matters – if it’s leading people to look into purely under-the-hood accesses that don’t happen on front-end pages to try to improve their site performance, then that’s a waste of time.

To Reproduce

Step-by-step reproduction instructions

  1. Install + initialize Updraft Plus free plugin
  2. Run AAA Optimizer
  3. Note calls to an autoload option that doesn't exist

Expected results

  1. Not identify this as an autoload option that doesn't exist

Actual results

  1. Hundreds of page_capability_updraft-options-group options do not exist listed.

Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.

Technical info

  • If relevant, which editor is affected (or editors):
  • Block Editor
  • Gutenberg Editor
  • Elementor Editor
  • Classic Editor
  • Other:
  • Which browser is affected (or browsers):
  • [x ] Chrome
  • [x ] Firefox
  • [x ] Safari
  • Other:

Used versions

  • Device you are using:
  • Operating system:
  • PHP version: 8
  • WordPress version: 6.6.2
  • WordPress Theme: GeneratePress
  • Plugin version: latest production
  • Gutenberg plugin version:
  • Elementor plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug: Updraft Plus
@martymi martymi added the bug Something isn't working label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants