90% optimus

Code Review | Optimus - WordPress Image Optimizer

WordPress plugin Optimus - WordPress Image Optimizer scored90%from 54 tests.

About plugin

  • Plugin page: optimus
  • Plugin version: 1.6.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2012
  • Latest release: May 19, 2023
  • Number of updates: 287
  • Update frequency: every 13.5 days
  • Top authors: sergej.mueller (64.81%)keycdn (35.54%)

Code review

54 tests

User reviews

68 reviews

Install metrics

40,000+ active /629,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.79ms] Passed 4 tests

This is a short check of server-side resources used by Optimus - WordPress Image Optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.71 ▼2.73
Dashboard /wp-admin3.44 ▲0.1359.27 ▲8.93
Posts /wp-admin/edit.php3.56 ▲0.2049.07 ▲4.06
Add New Post /wp-admin/post-new.php6.05 ▲0.1681.81 ▼16.80
Media Library /wp-admin/upload.php3.37 ▲0.1440.65 ▲4.33
Optimize all images /wp-admin/tools.php?page=optimus-bulk-optimizer3.3533.50
Optimus /wp-admin/options-general.php?page=optimus3.3432.11

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Optimus - WordPress Image Optimizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.17 ▼0.451.53 ▼0.0636.99 ▼1.33
Dashboard /wp-admin2,231 ▲545.58 ▼0.1083.18 ▼0.5675.43 ▲30.91
Posts /wp-admin/edit.php2,115 ▲152.00 ▲0.0233.30 ▼4.6135.61 ▲2.00
Add New Post /wp-admin/post-new.php1,548 ▲2018.16 ▼4.97604.78 ▼70.0074.08 ▲15.28
Media Library /wp-admin/upload.php1,420 ▲204.29 ▲0.0497.72 ▲1.9639.87 ▼1.45
Optimize all images /wp-admin/tools.php?page=optimus-bulk-optimizer7892.0423.8539.29
Optimus /wp-admin/options-general.php?page=optimus9872.0522.9828.75

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The SRP test was a success

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

optimus/optimus.php Passed 13 tests

The main PHP script in "Optimus - WordPress Image Optimizer" version 1.6.3 is automatically included on every request by WordPress
99 characters long description:
Smart compression and optimization of uploaded images in WordPress. Automatic, reliable, effective.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,460 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP83765681,286
JavaScript19090
CSS215484

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity21.43
▷ Minimum class complexity6.00
▷ Maximum class complexity68.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods4497.78%
▷ Public methods3373.33%
▷ Protected methods00.00%
▷ Private methods1226.67%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin