Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▼0.08MB] [CPU: ▼12.85ms] Passed 4 tests
Server-side resources used by JPG, PNG Compression and Optimization
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.15 | 42.26 ▼16.26 |
Dashboard /wp-admin | 3.35 ▲0.05 | 54.25 ▼9.44 |
Posts /wp-admin/edit.php | 3.40 ▼0.44 | 54.09 ▼8.80 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 107.91 ▼16.90 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 41.85 ▲6.79 |
Server storage [IO: ▲1.48MB] [DB: ▲0.07MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 144 new files
Database: 2 new tables, 6 new options
New tables |
---|
wp_image_compression_details |
wp_image_compression_settings |
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for JPG, PNG Compression and Optimization
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲44 | 14.10 ▲0.13 | 1.74 ▼0.15 | 48.03 ▲1.25 |
Dashboard /wp-admin | 2,211 ▲34 | 5.56 ▼0.04 | 102.29 ▼3.01 | 44.80 ▼7.30 |
Posts /wp-admin/edit.php | 2,116 ▲16 | 2.05 ▲0.06 | 39.69 ▲0.76 | 36.21 ▼0.80 |
Add New Post /wp-admin/post-new.php | 1,563 ▲37 | 22.75 ▼1.01 | 714.18 ▲1.44 | 64.35 ▼5.18 |
Media Library /wp-admin/upload.php | 1,431 ▲31 | 4.31 ▲0.15 | 135.97 ▲28.75 | 59.05 ▲9.92 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- The uninstall procedure failed, leaving 2 tables in the database
- wp_image_compression_details
- wp_image_compression_settings
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 41× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'lsolesen\\pel\\PelException' not found in wp-content/plugins/wp-image-compression/vendor/lsolesen/pel/src/PelInvalidDataException.php:45
- > PHP Fatal error
Uncaught Error: Class 'lsolesen\\pel\\PelEntry' not found in wp-content/plugins/wp-image-compression/vendor/lsolesen/pel/src/PelEntryVersion.php:68
- > PHP Fatal error
Uncaught Error: Class 'lsolesen\\pel\\PelEntryNumber' not found in wp-content/plugins/wp-image-compression/vendor/lsolesen/pel/src/PelEntryShort.php:57
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-image-compression/wp-image-compression.php on line 50
- > PHP Fatal error
Uncaught Error: Class 'lsolesen\\pel\\PelEntry' not found in wp-content/plugins/wp-image-compression/vendor/lsolesen/pel/src/PelEntryUndefined.php:50
- > PHP Fatal error
Uncaught Error: Class 'lsolesen\\pel\\PelEntryUndefined' not found in wp-content/plugins/wp-image-compression/vendor/lsolesen/pel/src/PelEntryUserComment.php:69
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-image-compression/views/api-settings.php:12
- > PHP Fatal error
Uncaught Error: Class 'lsolesen\\pel\\PelEntryLong' not found in wp-content/plugins/wp-image-compression/vendor/lsolesen/pel/src/PelEntryRational.php:61
- > PHP Fatal error
Uncaught Error: Class 'lsolesen\\pel\\PelException' not found in wp-content/plugins/wp-image-compression/vendor/lsolesen/pel/src/PelIfdException.php:43
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-image-compression/lib/class-wp-image-compression.php:1129
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #1 (Original 107KB), #2 (Compressed 82.6KB), #3 (Original 6000px 5.7MB), #4 (Resized and Compressed (1024px) 115KB)
- Tags: There are too many tags (11 tag instead of maximum 10)
wp-image-compression/wp-image-compression.php Passed 13 tests
This is the main PHP file of "JPG, PNG Compression and Optimization" version 1.7.35, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
Image Compression and resizing - Setup under the Tools menu
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected13,753 lines of code in 123 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 51 | 1,248 | 220 | 6,019 |
PHP | 59 | 1,485 | 7,057 | 5,964 |
CSS | 7 | 205 | 34 | 1,285 |
Markdown | 1 | 166 | 0 | 342 |
JSON | 2 | 0 | 0 | 95 |
YAML | 2 | 6 | 0 | 27 |
XML | 1 | 0 | 0 | 21 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 146)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 17.37 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 146.00 |
Average method complexity | 3.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 146.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 46 | |
▷ Abstract classes | 2 | 4.35% |
▷ Concrete classes | 44 | 95.65% |
▷ Final classes | 0 | 0.00% |
Methods | 290 | |
▷ Static methods | 66 | 22.76% |
▷ Public methods | 275 | 94.83% |
▷ Protected methods | 2 | 0.69% |
▷ Private methods | 13 | 4.48% |
Functions | 28 | |
▷ Named functions | 27 | 96.43% |
▷ Anonymous functions | 1 | 3.57% |
Constants | 240 | |
▷ Global constants | 12 | 5.00% |
▷ Class constants | 228 | 95.00% |
▷ Public constants | 228 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/logo-optimisation.png | 3.97KB | 3.99KB | 0.00% |
images/logo-optimisation-line.png | 0.85KB | 1.07KB | 0.00% |
images/map-pin.png | 66.89KB | 23.84KB | ▼ 64.36% |
images/icon-support.png | 0.76KB | 0.76KB | 0.13% |