89% speedsize-ai-image-optimizer

Code Review | SpeedSize Image & Video AI-Optimizer

WordPress plugin SpeedSize Image & Video AI-Optimizer scored89%from 54 tests.

About plugin

  • Plugin page: speedsize-ai-imag...
  • Plugin version: 1.4.23
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2022
  • Latest release: Oct 4, 2023
  • Number of updates: 52
  • Update frequency: every 7.8 days
  • Top authors: speedsize (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,144 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.79ms] Passed 4 tests

Analyzing server-side resources used by SpeedSize Image & Video AI-Optimizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.81 ▲4.18
Dashboard /wp-admin3.52 ▲0.1745.96 ▼12.81
Posts /wp-admin/edit.php3.63 ▲0.2750.49 ▼0.82
Add New Post /wp-admin/post-new.php6.09 ▲0.2084.13 ▼13.56
Media Library /wp-admin/upload.php3.44 ▲0.2137.70 ▲4.02

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SpeedSize Image & Video AI-Optimizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8214.53 ▼0.131.84 ▲0.1737.73 ▼5.97
Dashboard /wp-admin2,227 ▲475.62 ▼0.0781.99 ▼1.2438.16 ▼6.18
Posts /wp-admin/edit.php2,132 ▲322.04 ▲0.0442.39 ▲3.6336.38 ▲1.25
Add New Post /wp-admin/post-new.php1,547 ▲1918.31 ▼4.66635.24 ▼49.3269.39 ▲12.41
Media Library /wp-admin/upload.php1,430 ▲304.18 ▼0.0693.81 ▼9.9951.46 ▲6.04

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 86% 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: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

speedsize-ai-image-optimizer/speedsize.php 77% from 13 tests

The main PHP file in "SpeedSize Image & Video AI-Optimizer" ver. 1.4.23 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("speedsize-ai-image-optimizer.php" instead of "speedsize.php")

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
Success! There were no dangerous files found in this plugin1,568 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP122448071,562
SVG2006

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity27.00
▷ Minimum class complexity5.00
▷ Maximum class complexity45.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes444.44%
Methods129
▷ Static methods11488.37%
▷ Public methods11488.37%
▷ Protected methods1310.08%
▷ Private methods21.55%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants20
▷ Global constants525.00%
▷ Class constants1575.00%
▷ Public constants746.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin