Confusing WordPress capability calls with database lookups #25
Description
- [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:
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
- Install + initialize Updraft Plus free plugin
- Run AAA Optimizer
- Note calls to an autoload option that doesn't exist
Expected results
- Not identify this as an autoload option that doesn't exist
Actual results
- 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
Activity