`autoload-options-size` check should include autoloaded transients
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by locating the implementation of the autoload-options-size check and compare its behavior with the SQL query in the report and the referenced doctor-command PR #15. Confirm how unexpirable _transient_* options are handled, then update the check so its reported size includes them and verify the resulting total.
Written by the indexing model from the issue text.
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
wp doctor check autoload-options-size - 650 kB
SELECT 'Autoload kiB' as name, ROUND(SUM(LENGTH(option_value)) / 1024) as value FROM wp_options WHERE autoload='yes' - 2.4 MB
Difference is in counting _transient_* options.
https://codex.wordpress.org/Function_Reference/set_transient#Notes points out "NB: transients that never expire are autoloaded, whereas transients with an expiration time are not autoloaded. Consider this when adding transients that may not be needed on every page, and thus do not need to be autoloaded, impacting page performance."
Describe what you would expect as the correct outcome
wp doctor check autoload-options-size should count unexpirable transients.
Let us know what environment you are running this on
convers@pill2 ~/www/institute]# wp cli info
OS: Linux 2.6.32-754.17.1.el6.x86_64 #1 SMP Tue Jul 2 12:42:48 UTC 2019 x86_64
Shell: /bin/bash
PHP binary: /opt/cpanel/ea-php73/root/usr/bin/php
PHP version: 7.3.15
php.ini used: /opt/cpanel/ea-php73/root/etc/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /home/convers/public_html/institute
WP-CLI packages dir: /home/convers/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.4.0
Reading https://github.com/wp-cli/doctor-command/pull/15/files by @danielbachhuber I'm now thinking this may be an issue for wp option command instead. Your thoughts?
- Dominant language
- Gherkin
- Stars
- 169
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EverMind-AI/Raven#845 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
aoqia194/leaf-loader#19 ·
-
good first issue hacktoberfest
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
RogueAlg0/taken#385 · 3 comments ·
Maintainers usually reply within 1 day
-
discover: `sudo RTK_DISABLED=$VAR …` is not detected as a bypass when `sudo` is a transparent prefixOpenarea:cli bug good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
filamentphp/filament#20630 ·
Maintainers usually reply within 1 day