83% image-optimizer-wd

Code Review | Image Optimizer by 10web - Image Optimizer and Compression plugin

WordPress plugin Image Optimizer by 10web - Image Optimizer and Compression plugin scored83%from 54 tests.

About plugin

  • Plugin page: image-optimizer-wd
  • Plugin version: 6.0.65
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Aug 9, 2023
  • Number of updates: 96
  • Update frequency: every 22.6 days
  • Top authors: webdorado (72.92%)10web (26.04%)vanush10web (3.13%)

Code review

54 tests

User reviews

54 reviews

Install metrics

7,000+ active /316,078 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.09ms] Passed 4 tests

Analyzing server-side resources used by Image Optimizer by 10web - Image Optimizer and Compression plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.69 ▼5.92
Dashboard /wp-admin3.34 ▲0.0449.85 ▼2.70
Posts /wp-admin/edit.php3.39 ▲0.0451.02 ▼3.89
Add New Post /wp-admin/post-new.php5.97 ▲0.08102.41 ▲0.14
Media Library /wp-admin/upload.php3.26 ▲0.0441.55 ▲1.70
App /wp-admin/admin.php?page=onboarding_iowd3.3233.22
Logs /wp-admin/admin.php?page=iowd_logs3.3949.38

Server storage [IO: ▲1.68MB] [DB: ▲0.09MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 210 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
widget_recent-comments
tenweb_site_state_hash
tenweb_themes_state_hash
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
tenweb_addons_state_hash
tenweb_plugins_state_hash
two_trans_iowd_origin
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Optimizer by 10web - Image Optimizer and Compression plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲5913.29 ▼1.001.94 ▼0.1842.35 ▲3.12
Dashboard /wp-admin2,248 ▲425.84 ▼0.04115.27 ▲8.40101.76 ▲59.25
Posts /wp-admin/edit.php2,133 ▲331.99 ▼0.0233.86 ▼4.4631.77 ▼3.34
Add New Post /wp-admin/post-new.php1,558 ▲820.88 ▼2.33678.27 ▼6.0873.85 ▲13.60
Media Library /wp-admin/upload.php1,430 ▲334.22 ▼0.03117.69 ▲3.2084.13 ▲29.89
App /wp-admin/admin.php?page=onboarding_iowd8522.0526.0556.47
Logs /wp-admin/admin.php?page=iowd_logs9902.1826.4727.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.09MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 10 options
    • can_compress_scripts
    • widget_recent-comments
    • tenweb_plugins_state_hash
    • widget_recent-posts
    • db_upgraded
    • tenweb_site_state_hash
    • tenweb_themes_state_hash
    • tenweb_addons_state_hash
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Interop\\Queue\\Exception\\Exception' not found in wp-content/plugins/image-optimizer-wd/vendor/queue-interop/queue-interop/src/Exception/InvalidMessageException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'TenWebQueue\\Interfaces\\QueueConsumerInterface' not found in wp-content/plugins/image-optimizer-wd/vendor/10web-utils/10web-queue/src/TenWebQueue/Abstracts/QueueConsumerAbstract.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/image-optimizer-wd/vendor/queue-interop/queue-interop/tests/Impl/ConsumerPollingTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Polyfill\\Php80\\PhpToken' not found in wp-content/plugins/image-optimizer-wd/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Interop\\Queue\\Consumer' not found in wp-content/plugins/image-optimizer-wd/vendor/enqueue/fs/FsConsumer.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Tenweb_Authorization\\Product' not found in wp-content/plugins/image-optimizer-wd/vendor/10web/authorization/src/InstalledTheme.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Interop\\Queue\\Producer' not found in wp-content/plugins/image-optimizer-wd/vendor/enqueue/fs/FsProducer.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'TenWebQueue\\QueueOrchestrator' not found in wp-content/plugins/image-optimizer-wd/vendor/10web-utils/10web-queue/src/TenWebQueue/Examples/example.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Tenweb_Authorization\\Product' not found in wp-content/plugins/image-optimizer-wd/vendor/10web/authorization/src/InstalledPlugin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/image-optimizer-wd/includes/TenWebIORest.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: photos, image, compress, images optimization, performance...

image-optimizer-wd/tenweb-image-optimizer.php 77% from 13 tests

"Image Optimizer by 10web - Image Optimizer and Compression plugin" version 6.0.65's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Git Repository: Please remove the Git repository from this plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("image-optimizer-wd.php" instead of "tenweb-image-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
Success! There were no dangerous files found in this plugin13,539 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
PHP1292,1852,81310,562
JSON14101,002
CSS639151985
JavaScript480268541
Markdown101140251
SVG1600153
XML13027
YAML16018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.63
▷ Minimum class complexity1.00
▷ Maximum class complexity199.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces29
Interfaces18
Traits4
Classes89
▷ Abstract classes22.25%
▷ Concrete classes8797.75%
▷ Final classes44.60%
Methods695
▷ Static methods16323.45%
▷ Public methods59084.89%
▷ Protected methods91.29%
▷ Private methods9613.81%
Functions49
▷ Named functions2959.18%
▷ Anonymous functions2040.82%
Constants136
▷ Global constants10778.68%
▷ Class constants2921.32%
▷ Public constants29100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.95MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
onBoarding/assets/images/welcome_banner.png366.39KB81.81KB▼ 77.67%
assets/img/connect_1.png216.54KB47.57KB▼ 78.03%
onBoarding/assets/images/close.png0.25KB0.20KB▼ 19.31%
onBoarding/assets/images/signup_banner.png385.05KB99.13KB▼ 74.25%
onBoarding/assets/images/green_tick.png0.33KB0.21KB▼ 37.69%