83% ez-optimize-media-optimizer

Code Review | EZOptimize Image Optimizer

WordPress plugin EZOptimize Image Optimizer scored83%from 54 tests.

About plugin

  • Plugin page: ez-optimize-media...
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2018
  • Latest release: Feb 11, 2020
  • Number of updates: 24
  • Update frequency: every 20.3 days
  • Top authors: themediashop (75%)webbamboo (29.17%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,066 total downloads

Benchmarks

Plugin footprint 83% 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.09MB] [CPU: ▼5.67ms] Passed 4 tests

This is a short check of server-side resources used by EZOptimize Image Optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.38 ▼0.03
Dashboard /wp-admin3.39 ▲0.0953.29 ▲0.50
Posts /wp-admin/edit.php3.50 ▲0.1556.37 ▲0.35
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.49 ▼21.74
Media Library /wp-admin/upload.php3.31 ▲0.0838.77 ▼1.25

Server storage [IO: ▲0.47MB] [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: 22 new files
Database: no new tables, 7 new options
New WordPress options
ezoptimize
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by EZOptimize Image Optimizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.24 ▼0.321.80 ▲0.0544.16 ▼5.93
Dashboard /wp-admin2,208 ▲345.62 ▼0.0490.88 ▼8.5037.94 ▼0.26
Posts /wp-admin/edit.php2,116 ▲131.98 ▼0.0139.38 ▼1.8135.59 ▲1.99
Add New Post /wp-admin/post-new.php1,539 ▲1323.44 ▲0.34664.06 ▲47.7770.31 ▲12.52
Media Library /wp-admin/upload.php1,416 ▲164.33 ▲0.12103.87 ▼7.6543.57 ▼1.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • ezoptimize
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ez-optimize-media-optimizer/optimizer.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Settings Page)
The official readme.txt might help

ez-optimize-media-optimizer/optimizer.php 85% from 13 tests

The main file in "EZOptimize Image Optimizer" v. 2.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ez-optimize-media-optimizer.php" instead of "optimizer.php")
  • Description: The description should be shorter than 140 characters (currently 195 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected9,700 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript59991,2418,139
CSS15142211,212
PHP13738349

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected