67% imagify

Code Review | Imagify – Optimize Images & Convert WebP | Compress Images Easily

WordPress plugin Imagify – Optimize Images & Convert WebP | Compress Images Easily scored67%from 54 tests.

About plugin

  • Plugin page: imagify
  • Plugin version: 2.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Nov 16, 2023
  • Number of updates: 208
  • Update frequency: every 14.2 days
  • Top authors: wp_media (100%)

Code review

54 tests

User reviews

1375 reviews

Install metrics

800,000+ active /9,561,891 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.42MB] [CPU: ▲26.10ms] 75% from 4 tests

An overview of server-side resources used by Imagify – Optimize Images & Convert WebP | Compress Images Easily
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 667.07ms on /wp-admin/tools.php?page=action-scheduler)
PageMemory (MB)CPU Time (ms)
Home /6.40 ▲2.9369.93 ▲31.75
Dashboard /wp-admin6.92 ▲3.6175.94 ▲24.44
Posts /wp-admin/edit.php6.97 ▲3.6182.00 ▲35.19
Add New Post /wp-admin/post-new.php9.44 ▲3.55111.82 ▲13.01
Media Library /wp-admin/upload.php6.81 ▲3.5871.22 ▲36.17
Bulk Optimization /wp-admin/upload.php?page=imagify-bulk-optimization7.421,150.78
Imagify /wp-admin/options-general.php?page=imagify7.87339.22
Scheduled Actions /wp-admin/tools.php?page=action-scheduler7.04667.07

Server storage [IO: ▲3.89MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 540 new files
Database: 6 new tables, 14 new options
New tables
wp_imagify_folders
wp_actionscheduler_claims
wp_actionscheduler_groups
wp_actionscheduler_actions
wp_imagify_files
wp_actionscheduler_logs
New WordPress options
can_compress_scripts
schema-ActionScheduler_StoreSchema
imagify_files_db_version
schema-ActionScheduler_LoggerSchema
imagify_folders_db_version
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
action_scheduler_hybrid_store_demarkation
imagify_settings
...

Browser metrics Passed 4 tests

An overview of browser requirements for Imagify – Optimize Images & Convert WebP | Compress Images Easily
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲23914.72 ▲0.411.84 ▲0.0842.44 ▼5.83
Dashboard /wp-admin2,383 ▲2115.60 ▼0.1197.51 ▼1.7876.55 ▲36.38
Posts /wp-admin/edit.php2,291 ▲1912.03 ▲0.0235.16 ▼5.5234.58 ▲1.15
Add New Post /wp-admin/post-new.php1,693 ▲16523.65 ▲0.43792.60 ▲164.4630.31 ▼24.56
Media Library /wp-admin/upload.php1,607 ▲2044.83 ▲0.71118.56 ▲16.98105.99 ▲62.32
Bulk Optimization /wp-admin/upload.php?page=imagify-bulk-optimization2,1223.7074.4386.75
Imagify /wp-admin/options-general.php?page=imagify2,3402.8640.5870.32
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,4391.9130.7136.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_actionscheduler_claims
    • wp_actionscheduler_logs
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
  • This plugin does not fully uninstall, leaving 10 options in the database
    • schema-ActionScheduler_StoreSchema
    • widget_recent-comments
    • db_upgraded
    • schema-ActionScheduler_LoggerSchema
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • action_scheduler_hybrid_store_demarkation
    • action_scheduler_lock_async-request-runner

Smoke tests 50% 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 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 take a closer look at the following
  • 185× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/imagify/classes/WriteFile/AbstractIISDirConfFile.php
    • > /wp-content/plugins/imagify/inc/deprecated/classes/class-imagify-enable-media-replace-deprecated.php
    • > /wp-content/plugins/imagify/inc/deprecated/classes/class-imagify-attachment.php
    • > /wp-content/plugins/imagify/views/button/compare-images.php
    • > /wp-content/plugins/imagify/views/part-settings-files-tree-row.php
    • > /wp-content/plugins/imagify/classes/Webp/RewriteRules/Nginx.php
    • > /wp-content/plugins/imagify/inc/admin/upload.php
    • > /wp-content/plugins/imagify/views/notice-temporary.php
    • > /wp-content/plugins/imagify/inc/deprecated/classes/class-imagify-abstract-db-deprecated.php
    • > /wp-content/plugins/imagify/inc/classes/class-imagify-abstract-cron.php
  • 171× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Imagify\\CLI\\CommandInterface' not found in wp-content/plugins/imagify/classes/CLI/AbstractCommand.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/imagify/inc/Dependencies/ActionScheduler/lib/cron-expression/CronExpression_YearField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/imagify/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/imagify/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Imagify\\Context\\AbstractContext' not found in wp-content/plugins/imagify/classes/Context/CustomFolders.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/imagify/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Imagify\\Bulk\\AbstractBulk' not found in wp-content/plugins/imagify/classes/Bulk/WP.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/imagify/vendor/composer/installers/src/Composer/Installers/GravInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Exception' not found in wp-content/plugins/imagify/inc/Dependencies/ActionScheduler/classes/ActionScheduler_InvalidActionException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/imagify/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

imagify/imagify.php 77% from 13 tests

"Imagify – Optimize Images & Convert WebP | Compress Images Easily" version 2.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Description: The description should be shorter than 140 characters (currently 201 characters long)

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin46,665 lines of code in 509 files:
LanguageFilesBlank linesComment linesLines of code
PHP4169,87226,28432,843
JavaScript341,6282,2626,481
CSS205401536,453
JSON500344
SVG28187339
YAML3300111
Markdown339094

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity14.74
▷ Minimum class complexity1.00
▷ Maximum class complexity196.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces44
Interfaces13
Traits7
Classes282
▷ Abstract classes3412.06%
▷ Concrete classes24887.94%
▷ Final classes00.00%
Methods1,977
▷ Static methods21310.77%
▷ Public methods1,58880.32%
▷ Protected methods33817.10%
▷ Private methods512.58%
Functions257
▷ Named functions23491.05%
▷ Anonymous functions238.95%
Constants110
▷ Global constants1311.82%
▷ Class constants9788.18%
▷ Public constants97100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-wprocket@2x.png7.60KB7.59KB0.15%
assets/images/icon-pack.png0.43KB0.41KB▼ 3.42%
assets/images/lazyload.png0.72KB0.68KB▼ 5.04%
assets/images/logo-wprocket.png3.55KB3.54KB0.19%
assets/images/upload-image.png0.54KB0.54KB0.00%