Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲5.37MB] [CPU: ▲24.64ms] 75% from 4 tests
This is a short check of server-side resources used by Media Library File Download
The following require your attention
- Extra RAM: Extra memory usage must be kept under 5MB (currently 5.37MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.19 ▲5.73 | 72.48 ▲29.68 |
Dashboard /wp-admin | 9.21 ▲5.91 | 82.07 ▲29.81 |
Posts /wp-admin/edit.php | 9.21 ▲5.85 | 75.46 ▲26.55 |
Add New Post /wp-admin/post-new.php | 9.88 ▲4.00 | 113.60 ▲12.52 |
Media Library /wp-admin/upload.php | 9.21 ▲5.98 | 75.13 ▲38.65 |
Media Library File Download /wp-admin/admin.php?page=media-download | 9.21 | 74.59 |
Freemius Debug [v.2.5.5] /wp-admin/admin.php?page=freemius | 9.21 | 62.02 |
Server storage [IO: ▲4.56MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 267 new files
Database: no new tables, 9 new options
New WordPress options |
---|
can_compress_scripts |
fs_accounts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
fs_active_plugins |
widget_recent-comments |
fs_debug_mode |
Browser metrics Passed 4 tests
A check of browser resources used by Media Library File Download
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,809 ▲48 | 14.34 ▼0.19 | 1.74 ▲0.11 | 31.64 ▼11.68 |
Dashboard /wp-admin | 2,209 ▲32 | 5.64 ▲0.02 | 86.45 ▼15.31 | 45.18 ▲1.68 |
Posts /wp-admin/edit.php | 2,118 ▲18 | 2.00 ▲0.04 | 35.53 ▼1.21 | 35.99 ▲1.25 |
Add New Post /wp-admin/post-new.php | 1,533 ▲5 | 23.55 ▲0.34 | 696.51 ▲29.35 | 57.16 ▲5.17 |
Media Library /wp-admin/upload.php | 1,484 ▲84 | 4.27 ▲0.07 | 125.34 ▲7.95 | 55.62 ▲5.80 |
Media Library File Download /wp-admin/admin.php?page=media-download | 982 | 1.65 | 29.20 | 70.27 |
Freemius Debug [v.2.5.5] /wp-admin/admin.php?page=freemius | 1,082 | 1.69 | 26.18 | 29.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/media-download/lib/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- Zombie WordPress options detected upon uninstall: 9 options
- fs_active_plugins
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- fs_accounts
- fs_debug_mode
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 24× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'ZipStream\\Exception' not found in wp-content/plugins/media-download/lib/media/vendor/maennchen/zipstream-php/src/Exception/OverflowException.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/media-download/lib/media/vendor/psr/http-message/src/ServerRequestInterface.php:43
- > PHP Fatal error
Uncaught Error: Class 'MyCLabs\\Enum\\Enum' not found in wp-content/plugins/media-download/lib/media/vendor/maennchen/zipstream-php/src/Option/Version.php:20
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/media-download/lib/media/vendor/maennchen/zipstream-php/test/BigintTest.php:11
- > PHP Warning
require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/media-download/class-media-download.php on line 3
- > PHP Fatal error
Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/media-download/lib/media/vendor/myclabs/php-enum/src/Enum.php:22
- > PHP Fatal error
Uncaught Error: Class 'ZipStream\\Exception' not found in wp-content/plugins/media-download/lib/media/vendor/maennchen/zipstream-php/src/Exception/FileNotFoundException.php:12
- > PHP Fatal error
Uncaught Error: Class 'ZipStream\\Exception' not found in wp-content/plugins/media-download/lib/media/vendor/maennchen/zipstream-php/src/Exception/FileNotReadableException.php:12
- > PHP Fatal error
Uncaught Error: Class 'SebastianBergmann\\Comparator\\Comparator' not found in wp-content/plugins/media-download/lib/media/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/media-download/lib/media/vendor/psr/http-message/src/RequestInterface.php:24
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: file download, download image, easy file download, media library, export media library...
media-download/media-download.php Passed 13 tests
The main file in "Media Library File Download" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
86 characters long description:
A lightweight plugin that adds one-click download functionality to your Media Library.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected53,180 lines of code in 214 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 161 | 8,847 | 19,963 | 36,719 |
PO File | 12 | 6,960 | 8,455 | 15,240 |
JSON | 4 | 0 | 0 | 347 |
JavaScript | 4 | 68 | 66 | 274 |
Markdown | 5 | 102 | 0 | 266 |
reStructuredText | 9 | 119 | 243 | 126 |
XML | 4 | 11 | 1 | 98 |
CSS | 14 | 18 | 0 | 97 |
make | 1 | 2 | 2 | 13 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,079)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 58.66 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,079.00 |
Average method complexity | 4.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 11 | |
Interfaces | 8 | |
Traits | 0 | |
Classes | 75 | |
▷ Abstract classes | 4 | 5.33% |
▷ Concrete classes | 71 | 94.67% |
▷ Final classes | 3 | 4.23% |
Methods | 1,550 | |
▷ Static methods | 249 | 16.06% |
▷ Public methods | 1,131 | 72.97% |
▷ Protected methods | 36 | 2.32% |
▷ Private methods | 383 | 24.71% |
Functions | 99 | |
▷ Named functions | 94 | 94.95% |
▷ Anonymous functions | 5 | 5.05% |
Constants | 164 | |
▷ Global constants | 98 | 59.76% |
▷ Class constants | 66 | 40.24% |
▷ Public constants | 65 | 98.48% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/download_icon.png | 6.00KB | 2.34KB | ▼ 60.94% |
lib/freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
lib/freemius/assets/img/media-download.png | 9.16KB | 5.26KB | ▼ 42.58% |
lib/freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
img/download_icon_hover.png | 6.04KB | 2.34KB | ▼ 61.26% |