Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.18MB] [CPU: ▲3.33ms] Passed 4 tests
This is a short check of server-side resources used by Cut down uploads size
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.21 | 44.84 ▲3.66 |
Dashboard /wp-admin | 3.51 ▲0.21 | 60.84 ▲14.36 |
Posts /wp-admin/edit.php | 3.56 ▲0.21 | 49.58 ▲4.28 |
Add New Post /wp-admin/post-new.php | 6.05 ▲0.16 | 85.47 ▲0.41 |
Media Library /wp-admin/upload.php | 3.37 ▲0.15 | 37.28 ▲4.95 |
Cut down uploads size /wp-admin/options-general.php?page=settings_menu_item | 3.34 | 31.30 |
Server storage [IO: ▲1.53MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 69 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
Cut down uploads size: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,824 ▲89 | 13.72 ▼0.57 | 5.13 ▲3.35 | 43.50 ▼4.44 |
Dashboard /wp-admin | 2,227 ▲39 | 5.02 ▲0.14 | 120.28 ▲18.41 | 38.45 ▲0.60 |
Posts /wp-admin/edit.php | 2,116 ▲27 | 2.34 ▲0.29 | 41.82 ▲2.33 | 35.97 ▲1.33 |
Add New Post /wp-admin/post-new.php | 1,530 ▼12 | 23.54 ▲5.25 | 670.85 ▲64.92 | 60.28 ▲8.38 |
Media Library /wp-admin/upload.php | 1,415 ▲33 | 4.44 ▲0.20 | 94.12 ▲1.98 | 41.74 ▲1.77 |
Cut down uploads size /wp-admin/options-general.php?page=settings_menu_item | 876 | 2.45 | 37.92 | 31.12 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/cut-down-uploads-size/includes/admin/views/settings-page.php:3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cut-down-uploads-size/includes/admin/classes/php-image-resize/vendor/gumlet/php-image-resize/test/ImageResizeExceptionTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cut-down-uploads-size/includes/admin/classes/php-image-resize/vendor/gumlet/php-image-resize/test/ImageResizeTest.php:7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: compress images, reduce image size, image optimization, optimize images
cut-down-uploads-size/all-images-optimizer.php 92% from 13 tests
The principal PHP file in "Cut down uploads size" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cut-down-uploads-size.php" instead of "all-images-optimizer.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected15,426 lines of code in 54 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 1,369 | 1,508 | 9,747 |
CSS | 4 | 2 | 15 | 2,316 |
PHP | 36 | 957 | 867 | 2,200 |
SVG | 1 | 0 | 0 | 685 |
Markdown | 2 | 116 | 0 | 286 |
JSON | 3 | 0 | 0 | 118 |
PO File | 1 | 8 | 8 | 33 |
YAML | 1 | 5 | 0 | 27 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 10.64 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 109.00 |
Average method complexity | 2.46 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 25 | |
▷ Abstract classes | 1 | 4.00% |
▷ Concrete classes | 24 | 96.00% |
▷ Final classes | 1 | 4.17% |
Methods | 168 | |
▷ Static methods | 33 | 19.64% |
▷ Public methods | 162 | 96.43% |
▷ Protected methods | 2 | 1.19% |
▷ Private methods | 4 | 2.38% |
Functions | 10 | |
▷ Named functions | 7 | 70.00% |
▷ Anonymous functions | 3 | 30.00% |
Constants | 18 | |
▷ Global constants | 8 | 44.44% |
▷ Class constants | 10 | 55.56% |
▷ Public constants | 10 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected