Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.01MB] [CPU: ▼149.28ms] Passed 4 tests
Server-side resources used by Media File Sizes
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 44.77 ▲19.11 |
Dashboard /wp-admin | 3.07 ▲0.01 | 45.73 ▼9.58 |
Posts /wp-admin/edit.php | 3.12 ▲0.01 | 49.52 ▲0.17 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.01 | 96.06 ▼595.24 |
Media Library /wp-admin/upload.php | 3.01 ▲0.01 | 43.66 ▲7.53 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options |
---|
mediafilesize_version |
Browser metrics Passed 4 tests
Checking browser requirements for Media File Sizes
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,713 ▲117 | 15.84 ▲0.31 | 10.58 ▲0.64 | 52.04 ▲3.00 |
Dashboard /wp-admin | 2,970 ▲33 | 5.97 ▼0.15 | 149.19 ▼6.37 | 120.03 ▼3.30 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.72 ▲0.01 | 65.55 ▼18.49 | 100.95 ▲0.88 |
Add New Post /wp-admin/post-new.php | 1,604 ▲23 | 18.78 ▼1.49 | 407.76 ▲3.81 | 115.90 ▼0.27 |
Media Library /wp-admin/upload.php | 1,812 ▲2 | 5.06 ▲0.02 | 150.09 ▼0.26 | 131.41 ▲0.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/media-file-sizes/media_file_sizes.php:26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Screenshots: Add an image for screenshot #1 (A sortable column is added to the Media Library which displays the total space used by this media item (including generated sizes for image files). If a quota is in effect, a color-coded percentage is displayed, based on what percent of the quota this media item is using.)
media-file-sizes/media_file_sizes.php 92% from 13 tests
The main file in "Media File Sizes" v. 1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("media-file-sizes.php" instead of "media_file_sizes.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin171 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 67 | 63 | 171 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 5.70KB | 4.12KB | ▼ 27.77% |