Opened 8 weeks ago
Last modified 9 days ago
#64445 new enhancement
Expose disk size for each installed plugin
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Site Health | Keywords: | has-patch has-screenshots changes-requested |
| Focuses: | ui | Cc: |
Description
Currently, WordPress displays metadata such as Version, Author, and Details below each plugin name on the Plugins screen. However, there is no built-in way to view how much disk space an installed plugin consumes.
This enhancement proposes displaying the Plugin Size inline with existing metadata, improving transparency for administrators managing storage, backups, and performance—especially on shared or limited hosting environments.
Current Output
Version 5.6 | By Automattic – Anti-spam Team | View details
Proposed Output
Version 5.6 | Plugin Size 1.42 MB | By Automattic – Anti-spam Team | View details
Why This Belongs in Core
- No UI clutter (uses existing plugin meta row)
- Helps identify large plugins quickly
- No frontend impact
- No database schema changes
- Uses existing WordPress hooks
- Avoids need for third-party plugins
Technical Approach
- Hook into plugin_row_meta to append plugin size
- Calculate size from the plugin’s directory
- Cache size using transients to prevent repeated filesystem scans
- Clear cache on plugin update or deletion
- Admin-only execution
Attachments (3)
Change History (19)
#1
@
8 weeks ago
- Component changed from Administration to Site Health
- Keywords needs-patch added; has-patch needs-testing removed
- Version trunk deleted
#2
@
8 weeks ago
- Focuses performance removed
- Keywords 2nd-opinion added
- Summary changed from Add the plugin directory size to the plugin meta row on the Plugins screen (wp-admin/plugins.php) next to the Version information. to Expose disk size for each installed plugin
#3
@
8 weeks ago
- Keywords needs-testing has-patch added; needs-patch removed
- Version set to trunk
@westonruter
Patch attached.
This patch extends Site Health → Info → Directories and Sizes to expose
disk usage for each individual installed plugin.
It reuses existing filesystem logic via WP_Filesystem_Direct::dirsize(),
consistent with how core already calculates directory sizes, and adds
a new “Plugins (individual)” entry to the Site Health debug data.
The calculation runs only when viewing Site Health Info and does not
impact normal admin or front-end requests. No UI changes are introduced,
and no new public APIs are added.
Feedback welcome.
#4
@
8 weeks ago
- Keywords needs-refresh added; 2nd-opinion removed
- Milestone changed from Awaiting Review to 7.0
- Version trunk deleted
The "version" field indicates when the issue was first introduced. It's not something newly in trunk, so this can be left blank.
Please open a pull request with the patch to facilitate review and testing. This is more helpful than attaching a patch file.
This ticket was mentioned in PR #10671 on WordPress/wordpress-develop by @maulikmakwana2008.
7 weeks ago
#5
- Keywords needs-refresh removed
#6
@
7 weeks ago
- Keywords has-pr added
- Version set to trunk
@westonruter
you can review added PR request https://github.com/WordPress/wordpress-develop/pull/10671 and attached Updated64445.jpg
#7
@
7 weeks ago
- Version trunk deleted
Please leave the version blank, or else it could be set to back when the site info was added.
#8
@
7 weeks ago
@westonruter
Thanks for the clarification. I don’t have permission to update the Version field, but I agree it should be left blank.
#9
@
7 weeks ago
@maulikmakwana2008 you set it to trunk again in your previous update.
#10
@
6 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/10671
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Firefox 146.0
- OS: Ubuntu
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Actual Results
- ✅ Issue resolved with patch.
Before:
After:
#11
@
5 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/10671
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Chrome 143.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Performance Lab 4.0.1
- Test Reports 1.2.1
Actual Results
- ✅ Issue resolved with patch.
Screenshots
| Before | After |
|---|---|
|
|
Additional Notes
- Plugins can create files/folders outside their base folder. For example, they usually store certain files in the /wp-content/uploads/[plugin-name] folder. Therefore, this patch doesn't calculate disk space usage for files created outside the plugin's base directory.
This ticket was mentioned in Slack in #core by maulik_makwana. View the logs.
12 days ago
This ticket was mentioned in PR #10878 on WordPress/wordpress-develop by @vishalkakadiya.
9 days ago
#15
Trac ticket: https://core.trac.wordpress.org/ticket/64445




I don't think this is appropriate for plugins list table. I would imagine plugin size is rarely if ever an issue when compared with the amount of storage taken up by uploaded images.
So if we do this, I think it would make more sense to add to Site Health info, to break down the current "Plugins directory size" entry into the sizes for individual plugins.