84% image-cdn

Code Review | ImageEngine Optimizer CDN – Convert to WebP & AVIF

WordPress plugin ImageEngine Optimizer CDN – Convert to WebP & AVIF scored 84% from 54 tests.

About plugin

  • Plugin page: image-cdn
  • Plugin version: 1.1.12
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Sep 6, 2023
  • Number of updates: 43
  • Update frequency: every 29.3 days
  • Top authors: imageengine (86.05%)florincovaciuarniaro (16.28%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 7,416 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.70ms] Passed 4 tests

A check of server-side resources used by ImageEngine Optimizer CDN – Convert to WebP & AVIF
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.64 ▼3.33
Dashboard /wp-admin3.32 ▲0.0246.78 ▼1.14
Posts /wp-admin/edit.php3.37 ▲0.0243.62 ▼4.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.64 ▼12.91
Media Library /wp-admin/upload.php3.24 ▲0.0138.95 ▼1.64

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
image_cdn
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ImageEngine Optimizer CDN – Convert to WebP & AVIF
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8513.24 ▼0.981.71 ▼0.4443.88 ▼2.40
Dashboard /wp-admin2,242 ▲535.84 ▲0.88104.26 ▼16.3738.80 ▼2.37
Posts /wp-admin/edit.php2,134 ▲452.01 ▲0.0235.86 ▼1.3730.79 ▼4.21
Add New Post /wp-admin/post-new.php1,388 ▼12616.59 ▼1.08570.84 ▼106.1145.13 ▼4.97
Media Library /wp-admin/upload.php1,434 ▲464.26 ▲0.01111.56 ▲2.0547.62 ▲1.85

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/image-cdn/templates/settings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: cdn, image convert, image cdn, webp, content delivery network...

image-cdn/image-cdn.php 92% from 13 tests

"ImageEngine Optimizer CDN – Convert to WebP & AVIF" version 1.1.12's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 160 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,018 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP52184501,017
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity36.33
▷ Minimum class complexity26.00
▷ Maximum class complexity53.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods43
▷ Static methods3376.74%
▷ Public methods4195.35%
▷ Protected methods12.33%
▷ Private methods12.33%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin