89% easy-image-optimizer

Code Review | Easy Image Optimizer

WordPress plugin Easy Image Optimizer scored89%from 54 tests.

About plugin

  • Plugin page: easy-image-optimizer
  • Plugin version: 3.5.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 19, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 74
  • Update frequency: every 21.2 days
  • Top authors: nosilver4u (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /13,274 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.52MB] [CPU: ▼6.52ms] Passed 4 tests

An overview of server-side resources used by Easy Image Optimizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5538.33 ▼4.18
Dashboard /wp-admin3.87 ▲0.5349.07 ▼10.80
Posts /wp-admin/edit.php3.92 ▲0.5748.72 ▼1.51
Add New Post /wp-admin/post-new.php6.39 ▲0.5083.78 ▼9.60
Media Library /wp-admin/upload.php3.73 ▲0.5037.01 ▲5.71
Easy Image Optimizer /wp-admin/options-general.php?page=easy-image-optimizer-options3.7033.91

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

A short overview of filesystem and database impact
These are issues you should consider
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/easy-image-optimizer/" and "wp-content/uploads/"
    • (new file) wp-content/easyio/.empty
Filesystem: 28 new files
Database: no new tables, 21 new options
New WordPress options
easyio_plan_id
easyio_use_siip
exactdn_all_the_things
widget_theysaidso_widget
exactdn_prevent_db_queries
easyio_version
easyio_exactdn
db_upgraded
easyio_add_missing_dims
easyio_ll_autoscale
...

Browser metrics Passed 4 tests

A check of browser resources used by Easy Image Optimizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7614.19 ▼0.521.77 ▲0.1738.68 ▼5.12
Dashboard /wp-admin2,203 ▲265.60 ▼0.0490.72 ▼2.6038.40 ▼3.42
Posts /wp-admin/edit.php2,108 ▲111.94 ▲0.0041.60 ▲2.5436.78 ▲3.42
Add New Post /wp-admin/post-new.php1,533 ▲723.15 ▲0.17599.86 ▲5.8257.12 ▼3.70
Media Library /wp-admin/upload.php1,411 ▲114.17 ▼0.1295.45 ▼0.1242.94 ▲1.34
Easy Image Optimizer /wp-admin/options-general.php?page=easy-image-optimizer-options1,0411.9729.7632.07

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 14 options in the database
    • easyio_use_lqip
    • easyio_add_missing_dims
    • easyio_ll_autoscale
    • db_upgraded
    • widget_theysaidso_widget
    • exactdn_prevent_db_queries
    • can_compress_scripts
    • widget_recent-posts
    • exactdn_exclude
    • widget_recent-comments
    • ...

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: lazy load, resize, convert, optimize, image...

easy-image-optimizer/easy-image-optimizer.php 92% from 13 tests

The main PHP script in "Easy Image Optimizer" version 3.5.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 149 characters long)

Code Analysis 95% 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
There were no executable files found in this plugin7,967 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP96042,2806,423
JavaScript9226671,468
XML18037
YAML18021
Markdown19018

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,004)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 229)
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity308.83
▷ Minimum class complexity12.00
▷ Maximum class complexity1,004.00
Average method complexity12.47
▷ Minimum method complexity1.00
▷ Maximum method complexity229.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods161
▷ Static methods10.62%
▷ Public methods15797.52%
▷ Protected methods31.86%
▷ Private methods10.62%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/test.png0.85KB0.86KB0.00%
images/question-circle.png0.57KB0.47KB▼ 17.62%
images/easyio-toon-car.png15.76KB5.71KB▼ 63.79%