Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.61MB] [CPU: ▼17.49ms] Passed 4 tests
This is a short check of server-side resources used by Crush.pics Image Optimizer – Image Compression and Optimization
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 39.37 ▼0.74 |
Dashboard /wp-admin | 3.37 ▲0.07 | 43.92 ▼4.87 |
Posts /wp-admin/edit.php | 3.49 ▲0.13 | 46.86 ▼1.98 |
Add New Post /wp-admin/post-new.php | 3.25 ▼2.64 | 36.58 ▼62.35 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 40.58 ▲8.17 |
Server storage [IO: ▲1.09MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 46 new files
Database: 2 new tables, 6 new options
New tables |
---|
wp_crush_image_all_sizes |
wp_crush_image_actions |
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Crush.pics Image Optimizer – Image Compression and Optimization
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,873 ▲138 | 13.31 ▼1.06 | 2.04 ▼0.04 | 44.50 ▼5.42 |
Dashboard /wp-admin | 2,254 ▲66 | 5.12 ▼0.79 | 103.51 ▼12.01 | 70.67 ▲20.83 |
Posts /wp-admin/edit.php | 2,140 ▲51 | 1.98 ▼0.06 | 34.89 ▲0.19 | 33.91 ▲1.39 |
Add New Post /wp-admin/post-new.php | 1,713 ▲179 | 22.52 ▼0.64 | 701.49 ▲44.70 | 50.89 ▲5.44 |
Media Library /wp-admin/upload.php | 1,487 ▲102 | 4.40 ▲0.19 | 103.43 ▲2.29 | 67.57 ▲25.16 |
Uninstaller [IO: ▲0.00MB] [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
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
- 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Warning
Use of undefined constant WPIC_PATH - assumed 'WPIC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/crush-pics/inc/class-crush-all-process.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/crush-pics/inc/views/settings.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/crush-pics/inc/views/dashboard.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/crush-pics/inc/views/image-list-template.php:9
- > PHP Warning
Use of undefined constant WPIC_URL - assumed 'WPIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/crush-pics/inc/views/validate-create-account.php on line 15
- > PHP Notice
Undefined variable: api_key_added in wp-content/plugins/crush-pics/inc/views/settings.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/crush-pics/inc/views/media-list.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/crush-pics/inc/views/validate-create-account.php:16
- > PHP Notice
Undefined variable: is_register_done in wp-content/plugins/crush-pics/inc/views/validate-create-account.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/crush-pics/inc/views/single-media-page.php:2
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
- License uri: Invalid url: ""
- Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
crush-pics/image-compression.php 85% from 13 tests
The main file in "Crush.pics Image Optimizer – Image Compression and Optimization" v. 1.8.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("crush-pics.php" instead of "image-compression.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin7,789 lines of code in 41 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 19 | 1,117 | 485 | 3,950 |
JavaScript | 7 | 318 | 151 | 1,850 |
CSS | 5 | 317 | 35 | 1,781 |
SVG | 9 | 0 | 9 | 206 |
Markdown | 1 | 0 | 0 | 2 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 37.55 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 218.00 |
Average method complexity | 4.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 20.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 2 | 18.18% |
▷ Concrete classes | 9 | 81.82% |
▷ Final classes | 0 | 0.00% |
Methods | 121 | |
▷ Static methods | 40 | 33.06% |
▷ Public methods | 99 | 81.82% |
▷ Protected methods | 20 | 16.53% |
▷ Private methods | 2 | 1.65% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 100.00% |
Constants | 7 | |
▷ Global constants | 4 | 57.14% |
▷ Class constants | 3 | 42.86% |
▷ Public constants | 3 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.20MB
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/crush-color-bg.png | 203.42KB | 226.06KB | 0.00% |
assets/img/info-icon-01.png | 0.16KB | 0.11KB | ▼ 28.40% |