Skip to content

Show Disk Usage in At a Glance and as Site Health status/info from cPanel® - a WordPress plugin

License

Notifications You must be signed in to change notification settings

Webfacing/wf-cpanel-right-now-site-health

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebFacing - Disk Usage from cPanel® in At a Glance & Site Health - for WordPress

🕸️ By WebFacing. Shows disk usage information, recommendations and alerts in your admin Dashboard Right Now widget and on Site Health panels. Also includes a Site Health test for HTTPS only (http should not be allowed, but forwarded to https) with information about the issue, recommendation and actions. Made with a little help from cPanel, L.L.C., USA and PRO ISP AS, Norway - many thanks.

This plugin adds the following

Dashboard - At a Glance (widget)

  • One item showing used disk space (on a cPanel® controlled server only)
  • A widget footer line mentioning name of web hosting provider, and maximum disk space for current plan/account (on PRO ISP only)

Tools - Site Health panels

Status (tab)

  • A disk space test with explaining text and possible actions (cPanel® only) with following result types and actions
    • Good (less than 90%)
    • Recommended action (over 90%, but less than 95%)
    • Critical (over 95%)
  • A HTTPS only test with explaining text (with HTTPS enabled only), actions with link to a relevant guide (special guide in case PRO ISP), and with the following result types and actions
  • Good (http loopback requests are rejected)
  • Recommended action (http loopback requests successful)

Info (tab)

  • A disk space section containing (cPanel® only)
    • Max disk space available
    • Total disk space used
    • – Disk used by media files
    • – Disk space used by mail
  • Adds one line to the WordPress Constant values section
    • WF_DEBUG

Translation ready, ready translations are

  • Norwegian (bokmål)

Debug and simulation setting

To simulate high disk space utilization, report fictional, random high results close to upper limit, add this line to your wp-config.php or in another plugin:

const WF_DEBUG = true;

Known limitations

  • The amoumt of used disk space reported will not include space taken by other databases than the site's own WordPress database. The reported value may therefore be inaccurate or too low in some cases (accounts with more databases of any type).
  • The maximum available disk space seems only to be made visible by cPanel® when a user is active in the cPanel® UI and then cached for some time. This plugin will further cahe that value for up to on year. After an upgrade or downgrade, and no user login to cPanel®, this plugin might be misleading by reporting an old value.
  • This plugin will probably not report much if the site is not on a cPanel® managed server, but will do the test for HTTPS only.
  • This plugin is written for PHP 7.4 and later, and for WordPress 5.4 and later. It's namespaced, has static classes and uses typed class properties.