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.19MB] [CPU: ▼3.65ms] Passed 4 tests
Server-side resources used by MegaOptim Image Optimizer
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.64 ▲0.18 | 40.66 ▲0.32 |
Dashboard /wp-admin | 3.50 ▲0.19 | 46.74 ▲2.02 |
Posts /wp-admin/edit.php | 3.55 ▲0.19 | 44.31 ▼3.22 |
Add New Post /wp-admin/post-new.php | 6.10 ▲0.21 | 83.53 ▼13.72 |
Media Library /wp-admin/upload.php | 3.42 ▲0.19 | 37.94 ▲4.98 |
MegaOptim /wp-admin/options-general.php?page=megaoptim_settings | 3.50 | 35.93 |
Bulk MegaOptim /wp-admin/upload.php?page=megaoptim_bulk_optimizer | 3.48 | 35.68 |
Server storage [IO: ▲2.10MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 228 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_megaoptim_opt |
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
megaoptim_settings_data |
megaoptim_db_version |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
MegaOptim Image Optimizer: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,183 ▲448 | 13.71 ▼0.68 | 1.78 ▼0.02 | 43.42 ▼7.27 |
Dashboard /wp-admin | 2,589 ▲398 | 4.95 ▲0.08 | 109.48 ▲11.17 | 55.24 ▲14.32 |
Posts /wp-admin/edit.php | 2,475 ▲386 | 2.17 ▲0.21 | 39.44 ▲2.25 | 41.93 ▲6.48 |
Add New Post /wp-admin/post-new.php | 1,894 ▲361 | 18.44 ▼4.66 | 639.46 ▲17.57 | 49.25 ▼11.12 |
Media Library /wp-admin/upload.php | 1,801 ▲416 | 4.18 ▼0.01 | 106.79 ▲6.44 | 48.15 ▲5.97 |
MegaOptim /wp-admin/options-general.php?page=megaoptim_settings | 1,350 | 2.33 | 28.17 | 43.67 |
Bulk MegaOptim /wp-admin/upload.php?page=megaoptim_bulk_optimizer | 1,318 | 2.00 | 26.24 | 28.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_megaoptim_opt
- This plugin does not fully uninstall, leaving 8 options in the database
- db_upgraded
- megaoptim_settings_data
- widget_recent-comments
- megaoptim_db_version
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
Almost there! Just fix the following items
- 52× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
- > /wp-content/plugins/megaoptim-image-optimizer/includes/classes/Exceptions/MGO_Exception.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/classes/MGO_Ajax.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/views/modals/default.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/compat/mediapress/hooks/attachments.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/hooks/general.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/compat/nextgen-gallery/helpers.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/hooks/attachments.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/hooks/internal.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/compat/hosting/general/hooks.php
- > /wp-content/plugins/megaoptim-image-optimizer/includes/compat/cloudflare/classes/MGO_CloudFlare.php
- 35× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'MegaOptim\\Client\\Http\\BaseClient' not found in wp-content/plugins/megaoptim-image-optimizer/includes/libraries/megaoptim-php/src/Http/CurlClient.php:27
- > PHP Fatal error
Uncaught Error: Class 'MGO_BaseObject' not found in wp-content/plugins/megaoptim-image-optimizer/includes/classes/Adapters/MGO_Library.php:27
- > PHP Fatal error
Uncaught Error: Class 'Route' not found in wp-content/plugins/megaoptim-image-optimizer/assets/resources/jqueryfiletree/dist/connectors/PHP-Laravel/5/app/Http/routes.php:4
- > PHP Fatal error
Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/megaoptim-image-optimizer/includes/classes/Jobs/MGO_Background_Process.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/megaoptim-image-optimizer/includes/views/settings/key.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/megaoptim-image-optimizer/includes/views/parts/header.php:6
- > PHP Fatal error
Uncaught Error: Class 'MGO_Library' not found in wp-content/plugins/megaoptim-image-optimizer/includes/classes/Adapters/MGO_FileLibrary.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/megaoptim-image-optimizer/includes/views/parts/footer.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/megaoptim-image-optimizer/includes/views/misc/instructions.php:5
- > PHP Warning
Use of undefined constant WP_MEGAOPTIM_INC_PATH - assumed 'WP_MEGAOPTIM_INC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/megaoptim-image-optimizer/includes/constants.php on line 7
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
- > GET request to /wp-admin/upload.php?page=megaoptim_bulk_optimizer
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=hoverIntent,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 3:1808 Uncaught TypeError: Cannot set properties of undefined (setting 'wrap')
- > GET request to /wp-admin/upload.php?page=megaoptim_bulk_optimizer
- > Javascript (severe) in unknown
/wp-includes/js/dist/i18n.min.js?ver=7701b0c3857f914212ef 1:9103 Uncaught TypeError: Cannot read properties of undefined (reading 'hooks')
- > GET request to /wp-admin/upload.php?page=megaoptim_bulk_optimizer
- > Javascript (severe) in unknown
/wp-admin/upload.php?page=megaoptim_bulk_optimizer 381:0 Uncaught ReferenceError: wp is not defined
- > GET request to /wp-admin/upload.php?page=megaoptim_bulk_optimizer
- > Javascript (severe) in unknown
/wp-admin/js/common.min.js?ver=6.3.1 1:61 Uncaught ReferenceError: wp is not defined
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Screenshots: Add a description for screenshot #11 in megaoptim-image-optimizer/assets to your readme.txt
megaoptim-image-optimizer/megaoptim.php 85% from 13 tests
This is the main PHP file of "MegaOptim Image Optimizer" version 1.4.21, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("megaoptim-image-optimizer.php" instead of "megaoptim.php")
- Description: Please don't use more than 140 characters for the plugin description (currently 213 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected18,818 lines of code in 151 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 107 | 1,919 | 5,702 | 9,269 |
CSS | 7 | 190 | 56 | 3,618 |
SVG | 1 | 0 | 0 | 2,671 |
JavaScript | 12 | 281 | 482 | 1,899 |
Markdown | 3 | 97 | 0 | 317 |
HTML | 1 | 35 | 25 | 269 |
LESS | 2 | 19 | 5 | 156 |
CoffeeScript | 1 | 25 | 30 | 147 |
JSON | 4 | 0 | 0 | 119 |
Perl | 2 | 33 | 22 | 95 |
Go | 1 | 5 | 0 | 49 |
JSP | 1 | 3 | 8 | 38 |
C# | 2 | 10 | 1 | 34 |
ASP.NET | 1 | 2 | 0 | 29 |
Ruby | 1 | 7 | 26 | 28 |
ASP | 1 | 2 | 15 | 27 |
Python | 1 | 1 | 5 | 19 |
Blade | 2 | 2 | 0 | 17 |
Razor | 1 | 2 | 0 | 17 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 19.21 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 202.00 |
Average method complexity | 3.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 55 | |
▷ Abstract classes | 8 | 14.55% |
▷ Concrete classes | 47 | 85.45% |
▷ Final classes | 5 | 10.64% |
Methods | 480 | |
▷ Static methods | 64 | 13.33% |
▷ Public methods | 428 | 89.17% |
▷ Protected methods | 35 | 7.29% |
▷ Private methods | 17 | 3.54% |
Functions | 135 | |
▷ Named functions | 133 | 98.52% |
▷ Anonymous functions | 2 | 1.48% |
Constants | 94 | |
▷ Global constants | 35 | 37.23% |
▷ Class constants | 59 | 62.77% |
▷ Public constants | 59 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
46 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/resources/jqueryfiletree/dist/images/directory-lock.png | 0.65KB | 0.77KB | 0.00% |
assets/resources/jqueryfiletree/dist/images/psd.png | 0.84KB | 0.88KB | 0.00% |
assets/resources/jqueryfiletree/dist/images/file-lock.png | 0.60KB | 0.58KB | ▼ 2.77% |
assets/resources/jquery-ui/images/ui-bg_glass_80_d7ebf9_1x400.png | 0.34KB | 0.16KB | ▼ 53.76% |
assets/resources/jqueryfiletree/dist/images/music.png | 0.38KB | 0.61KB | 0.00% |