89% seo-image-optimizer

Code Review | Image Optimization For SEO

WordPress plugin Image Optimization For SEO scored89%from 54 tests.

About plugin

  • Plugin page: seo-image-optimizer
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Sep 14, 2016
  • Latest release: Nov 3, 2023
  • Number of updates: 56
  • Update frequency: every 46.6 days
  • Top authors: weblizar (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

5,000+ active /177,305 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.72ms] Passed 4 tests

A check of server-side resources used by Image Optimization For SEO
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.98 ▼0.20
Dashboard /wp-admin3.37 ▲0.0245.21 ▼17.99
Posts /wp-admin/edit.php3.42 ▲0.0643.62 ▲0.47
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.64 ▼5.04
Media Library /wp-admin/upload.php3.29 ▲0.0636.04 ▲0.36

Server storage [IO: ▲3.47MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
weblizar_wsio_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Optimization For SEO
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4014.67 ▲0.512.01 ▲0.3141.45 ▼2.69
Dashboard /wp-admin2,207 ▲275.64 ▼0.0486.92 ▼7.5641.26 ▲0.95
Posts /wp-admin/edit.php2,112 ▲152.00 ▼0.0236.11 ▼1.2932.01 ▼6.44
Add New Post /wp-admin/post-new.php1,536 ▲123.08 ▼2.12590.77 ▼13.9046.65 ▼22.23
Media Library /wp-admin/upload.php1,412 ▲154.16 ▼0.1196.02 ▼2.9340.95 ▼5.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • weblizar_wsio_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

seo-image-optimizer/seo-image-optimizer.php 85% from 13 tests

The primary PHP file in "Image Optimization For SEO" version 1.3.7 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please don't use more than 140 characters for the plugin description (currently 172 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 plugin27,622 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS53,7633915,268
SVG30128,777
JavaScript6991212,810
PHP582103767

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
options/images/logo.png47.73KB14.85KB▼ 68.88%