[wp-trac] [WordPress Trac] #46707: Site health: notify the user while gathering site data
WordPress Trac
noreply at wordpress.org
Thu Apr 11 08:46:36 UTC 2019
#46707: Site health: notify the user while gathering site data
-------------------------------------------------+-------------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.2
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: site-health has-patch needs-testing | Focuses: ui,
| performance
-------------------------------------------------+-------------------------
Comment (by afercia):
@azaozz great job :) I can't follow everything but I've tested a bit and
noticed a few things:
1
I have lots of plugins (some of them with node_modules directories) so in
my case it's expected to timeout. However, it seems it timeouts before 30
seconds in ~22 seconds. Is this expected?
2
Pre-existing issue, just a bit more evident now. If I'm not wrong, the
dirsize calculation is cached for one hour. This might be confusing for
users when they know their directories size has changed and they will
still see the previous value. For example:
- I've moved out all my plugins from the plugins directories, except hello
dolly and index.php
- ran the calculation, got: Plugins Directory Size 22.23 KB
- moved back all my plugins into the plugins directory
- ran again the calculation
- got the cached result: Plugins Directory Size 22.23 KB
This may happen any time users add or remove plugins (and also for themes,
attachments, db). Not a blocker I guess but maybe users should be informed
these size values are cached. Optionally, maybe consider to delete the
transient when plugins / themes are installed / deleted. Also, for uploads
/ attachments I see the `dirsize_cache` transient gets deleted but only if
multisite. As said, this part is pre-existing code but maybe worth
considering some improvements for the future?
3
When the dirsize values are cached, the results load almost immediately.
In this case, I'd consider to ''not'' display and speak the message
"Successfully calculated directory sizes."
4
Minor: I'd consider to place the spinner on the right:
- for consistency: I think spinners in WordPress are almost always on the
right
- to avoid the text "jumps" when the spinner disappears and new text
appears
5
Minor: jshint isn't happy with a couple extra commas:
{{{
src/js/_enqueues/admin/site-health.js
215 | _wpnonce: SiteHealth.nonce.site_status_result,
^ Extra
comma. (it breaks older versions of IE)
222 | dataType: 'json',
^ Extra comma. (it breaks older
versions of IE)
}}}
I guess this rule should be removed as WordPress doesn't support old IE
versions any longer, but for now it will error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46707#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list