Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.24MB] [CPU: ▲3.17ms] Passed 4 tests
A check of server-side resources used by AssetsMinify
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.91 ▲2.41 | 478.36 ▲437.44 |
Dashboard /wp-admin | 3.62 ▲0.27 | 53.84 ▲4.06 |
Posts /wp-admin/edit.php | 3.67 ▲0.27 | 52.75 ▲2.98 |
Add New Post /wp-admin/post-new.php | 6.13 ▲0.21 | 88.98 ▼0.78 |
Media Library /wp-admin/upload.php | 3.48 ▲0.21 | 39.50 ▲6.40 |
AssetsMinify /wp-admin/options-general.php?page=assets-minify | 3.45 | 43.71 |
Server storage [IO: ▲2.79MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 979 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
am_last_gc |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for AssetsMinify
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,767 ▲6 | 14.28 ▼0.34 | 2.22 ▲0.54 | 42.73 ▲0.95 |
Dashboard /wp-admin | 2,196 ▲22 | 5.61 ▲0.05 | 87.89 ▼0.56 | 41.14 ▼2.50 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.02 ▲0.01 | 35.74 ▼7.08 | 33.11 ▼5.26 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.11 ▼0.60 | 640.70 ▼33.88 | 54.03 ▼0.55 |
Media Library /wp-admin/upload.php | 1,407 ▲10 | 4.18 ▲0.01 | 95.22 ▼9.99 | 40.96 ▼5.99 |
AssetsMinify /wp-admin/options-general.php?page=assets-minify | 987 | 1.99 | 23.02 | 29.96 |
Uninstaller [IO: ▲1.11MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- Zombie WordPress options were found after uninstall: 7 options
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- am_last_gc
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 33× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_unit_tests/test_Minify_Cache_File.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_unit_tests/test_Minify_CSS.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_unit_tests/test_Minify_Cache_Memcache.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_unit_tests/test_Minify_JS_ClosureCompiler.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_extras/tools/minifyUrl.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_unit_tests/test_Minify_ImportProcessor.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_extras/tools/testRewriteUri.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_unit_tests/HTTP_ConditionalGet/2.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min_unit_tests/test_JSMinPlus.php
- > /wp-content/plugins/assetsminify/vendor/mrclay/minify/min/builder/index.php
- 307× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Assetic\\Filter\\BaseNodeFilter' not found in wp-content/plugins/assetsminify/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php:23
- > PHP Fatal error
Uncaught Error: Class 'Assetic\\Asset\\AssetCollection' not found in wp-content/plugins/assetsminify/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php:22
- > PHP Fatal error
Uncaught Error: Interface 'Assetic\\Filter\\FilterInterface' not found in wp-content/plugins/assetsminify/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php:24
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/assetsminify/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php:24
- > PHP Fatal error
require(): Failed opening required '/Minify/Loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/assetsminify/vendor/mrclay/minify/min_extras/cli/rewrite-uris.php on line 6
- > PHP Warning
stream_set_blocking() expects parameter 1 to be resource, string given in wp-content/plugins/assetsminify/vendor/symfony/process/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php on line 12
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/assetsminify/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php:19
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' not found in wp-content/plugins/assetsminify/vendor/symfony/process/Symfony/Component/Process/Pipes/WindowsPipes.php:27
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' not found in wp-content/plugins/assetsminify/vendor/symfony/process/Symfony/Component/Process/Exception/RuntimeException.php:19
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/assetsminify/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php:19
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: js, compass, assets, sass, coffeescript...
assetsminify/plugin.php 92% from 13 tests
This is the main PHP file of "AssetsMinify" version 2.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("assetsminify.php" instead of "plugin.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin62,298 lines of code in 930 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 456 | 9,330 | 16,172 | 39,048 |
CSS | 101 | 978 | 354 | 5,255 |
Sass | 115 | 1,361 | 1,208 | 4,736 |
Markdown | 26 | 1,118 | 0 | 3,334 |
YAML | 25 | 137 | 90 | 3,152 |
JavaScript | 135 | 744 | 889 | 3,074 |
LESS | 36 | 479 | 56 | 1,550 |
JSON | 14 | 1 | 0 | 1,396 |
HTML | 7 | 16 | 62 | 280 |
Java | 1 | 74 | 77 | 231 |
XML | 7 | 13 | 1 | 132 |
Bourne Shell | 5 | 38 | 7 | 104 |
make | 2 | 3 | 0 | 6 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
The following items need your attention
- Please reduce cyclomatic complexity of methods to less than 100 (currently 155)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 13.13 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 474.00 |
Average method complexity | 2.96 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 155.00 |
Code structure | ||
---|---|---|
Namespaces | 49 | |
Interfaces | 21 | |
Traits | 2 | |
Classes | 408 | |
▷ Abstract classes | 24 | 5.88% |
▷ Concrete classes | 384 | 94.12% |
▷ Final classes | 0 | 0.00% |
Methods | 2,750 | |
▷ Static methods | 149 | 5.42% |
▷ Public methods | 1,984 | 72.15% |
▷ Protected methods | 594 | 21.60% |
▷ Private methods | 172 | 6.25% |
Functions | 128 | |
▷ Named functions | 60 | 46.88% |
▷ Anonymous functions | 68 | 53.12% |
Constants | 246 | |
▷ Global constants | 107 | 43.50% |
▷ Class constants | 139 | 56.50% |
▷ Public constants | 139 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/mrclay/minify/min_unit_tests/HTTP_Encoder/green.png | 0.20KB | 0.08KB | ▼ 57.43% |
vendor/leafo/scssphp/site/www/img/tile.png | 0.24KB | 0.16KB | ▼ 31.97% |