78% robin-image-optimizer

Code Review | Robin image optimizer — save money on image compression

WordPress plugin Robin image optimizer — save money on image compression scored78%from 54 tests.

About plugin

  • Plugin page: robin-image-optim...
  • Plugin version: 1.6.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4
  • WordPress version: 6.3.1
  • First release: Aug 12, 2018
  • Latest release: Nov 23, 2023
  • Number of updates: 52
  • Update frequency: every 37.8 days
  • Top authors: webcraftic (42.31%)webtemyk (28.85%)alexkovalevv (21.15%)creativemotion (13.46%)

Code review

54 tests

User reviews

112 reviews

Install metrics

100,000+ active /1,272,556 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.78MB] [CPU: ▲18.07ms] Passed 4 tests

This is a short check of server-side resources used by Robin image optimizer — save money on image compression
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.32 ▲1.8651.85 ▲12.46
Dashboard /wp-admin6.41 ▲3.1169.90 ▲23.04
Posts /wp-admin/edit.php6.43 ▲3.0868.59 ▲24.23
Add New Post /wp-admin/post-new.php9.00 ▲3.11104.40 ▲16.23
Media Library /wp-admin/upload.php6.32 ▲3.0955.11 ▲20.53
Robin image optimizer /wp-admin/options-general.php?page=rio_general-wbcr_image_optimizer6.58309.73

Server storage [IO: ▲2.84MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 3 files (0.54KB) outside of "wp-content/plugins/robin-image-optimizer/" and "wp-content/uploads/"
    • (new file) wp-content/logs/index.html
    • (new file) wp-content/logs/app.log
    • (new file) wp-content/logs/.htaccess
Filesystem: 470 new files
Database: 1 new table, 14 new options
New tables
wp_rio_process_queue
New WordPress options
wbcr_io_image_optimization_server
widget_recent-posts
wbcr_io_image_optimize_flush_usage
wbcr_io_plugin_activated
wbcr_io_save_exif_data
can_compress_scripts
wbcr_io_image_optimize_all_usage
wbcr_io_backup_origin_images
wbcr_io_plugin_version
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Robin image optimizer — save money on image compression
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲9814.33 ▲0.171.79 ▲0.3542.28 ▲3.13
Dashboard /wp-admin2,268 ▲905.67 ▼0.0496.88 ▼12.4943.58 ▲2.01
Posts /wp-admin/edit.php2,174 ▲742.04 ▲0.0941.52 ▼2.1936.88 ▼3.40
Add New Post /wp-admin/post-new.php1,571 ▲4523.65 ▲0.52641.11 ▲23.6950.30 ▼0.29
Media Library /wp-admin/upload.php1,448 ▲484.29 ▲0.1098.71 ▼12.0642.90 ▼0.20
Robin image optimizer /wp-admin/options-general.php?page=rio_general-wbcr_image_optimizer1,2733.0178.6570.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
  • 16× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/robin-image-optimizer/libs/addons/views/part-bulk-optimization-table-folders.php
    • > /wp-content/plugins/robin-image-optimizer/views/clearfy-component-card.php
    • > /wp-content/plugins/robin-image-optimizer/views/part-bulk-optimization-servers.php
    • > /wp-content/plugins/robin-image-optimizer/views/part-bulk-optimization-total.php
    • > /wp-content/plugins/robin-image-optimizer/views/part-bulk-optimization-button.php
    • > /wp-content/plugins/robin-image-optimizer/views/part-bulk-optimization-tabs.php
    • > /wp-content/plugins/robin-image-optimizer/views/modal-bulk-optimization.php
    • > /wp-content/plugins/robin-image-optimizer/libs/addons/views/part-settings-page-webp-options.php
    • > /wp-content/plugins/robin-image-optimizer/views/part-bulk-optimization-statistic.php
    • > /wp-content/plugins/robin-image-optimizer/views/part-bulk-convert-webp-button.php
  • 20× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Factory_Templates_126\\Pages\\Step' not found in wp-content/plugins/robin-image-optimizer/libs/factory/templates/pages/setup-parts/class-step-form.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/robin-image-optimizer/libs/addons/includes/classes/class.folders-list-table.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'RIO_Base_Object' not found in wp-content/plugins/robin-image-optimizer/includes/classes/models/class-rio-base-extra-data.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RIO_Attachment_Extra_Data' not found in wp-content/plugins/robin-image-optimizer/includes/classes/models/class.webp-extra-data.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory473_Update' not found in wp-content/plugins/robin-image-optimizer/migrations/010402.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory473_Update' not found in wp-content/plugins/robin-image-optimizer/migrations/010300.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory473_Update' not found in wp-content/plugins/robin-image-optimizer/migrations/010306.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory473_Update' not found in wp-content/plugins/robin-image-optimizer/migrations/010309.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_FactoryForms469_FontControl' not found in wp-content/plugins/robin-image-optimizer/libs/factory/forms/controls/google-font.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/robin-image-optimizer/libs/addons/admin/ajax/folders.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

robin-image-optimizer/robin-image-optimizer.php Passed 13 tests

The principal PHP file in "Robin image optimizer — save money on image compression" v. 1.6.6 is loaded by WordPress automatically on each request
123 characters long description:
Optimize images without losing quality, speed up your website load, improve SEO and save money on server and CDN bandwidth.

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
Good job! No executable or dangerous file extensions detected41,505 lines of code in 342 files:
LanguageFilesBlank linesComment linesLines of code
PHP2477,51515,81125,516
CSS364993485,722
JavaScript337394563,776
LESS95991742,813
JSON4001,938
PO File94806121,564
Markdown3440143
XML14133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.80
▷ Minimum class complexity1.00
▷ Maximum class complexity90.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces23
Interfaces2
Traits1
Classes183
▷ Abstract classes2111.48%
▷ Concrete classes16288.52%
▷ Final classes21.23%
Methods1,479
▷ Static methods1469.87%
▷ Public methods1,21281.95%
▷ Protected methods21214.33%
▷ Private methods553.72%
Functions100
▷ Named functions5151.00%
▷ Anonymous functions4949.00%
Constants105
▷ Global constants7167.62%
▷ Class constants3432.38%
▷ Public constants34100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
32 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/addons/admin/assets/img/file-tree/film.png0.64KB0.75KB0.00%
libs/factory/templates/pages/templates/impressive-lite/assets/img/paypal-donate.png12.44KB4.99KB▼ 59.88%
libs/addons/admin/assets/img/file-tree/php.png0.53KB0.53KB0.00%
libs/addons/admin/assets/img/file-tree/zip.png0.38KB0.53KB0.00%
libs/addons/admin/assets/img/file-tree/pdf.png0.58KB0.57KB▼ 1.02%