77% image-optimizers

Code Review | Image Optimizers - Desktop, Mobile, Viewport Distance, Any Caching Plugin

WordPress plugin Image Optimizers - Desktop, Mobile, Viewport Distance, Any Caching Plugin scored77%from 54 tests.

About plugin

  • Plugin page: image-optimizers
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 22, 2020
  • Latest release: Jun 3, 2021
  • Number of updates: 8
  • Update frequency: every 51.1 days
  • Top authors: rsrussell (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /566 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.29MB] [CPU: ▲0.88ms] Passed 4 tests

This is a short check of server-side resources used by Image Optimizers - Desktop, Mobile, Viewport Distance, Any Caching Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3545.36 ▲3.23
Dashboard /wp-admin3.62 ▲0.3150.42 ▼0.80
Posts /wp-admin/edit.php3.67 ▲0.3150.41 ▲3.09
Add New Post /wp-admin/post-new.php6.16 ▲0.2788.33 ▼2.01
Media Library /wp-admin/upload.php3.48 ▲0.2541.09 ▲9.18

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 60 new files
Database: no new tables, 9 new options
New WordPress options
imop_wp_optimize
widget_recent-posts
imop_setting_data
theysaidso_admin_options
imop_version
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Optimizers - Desktop, Mobile, Viewport Distance, Any Caching Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲24913.78 ▼0.5712.58 ▲10.6939.73 ▼11.83
Dashboard /wp-admin2,289 ▲1155.64 ▲0.0483.90 ▼16.2840.91 ▼2.41
Posts /wp-admin/edit.php2,182 ▲851.99 ▼0.0533.30 ▼3.4834.55 ▼1.15
Add New Post /wp-admin/post-new.php1,540 ▲1323.72 ▲0.60713.15 ▲63.1460.38 ▲6.14
Media Library /wp-admin/upload.php1,482 ▲854.28 ▲0.11109.40 ▲3.9247.63 ▲3.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • imop_wp_optimize

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/image-optimizers/optimizers.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'IMOP\\Common\\IMOPBaseController' not found in wp-content/plugins/image-optimizers/opt/Common/IMOPAdminController.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/image-optimizers/views/setting_view.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-optimizers/opt/Helper/IMOPCommonHelper.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-optimizers/opt/Helper/IMOPCommonHelper.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% 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
Attributes that require attention:
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

image-optimizers/optimizers.php 77% from 13 tests

This is the main PHP file of "Image Optimizers - Desktop, Mobile, Viewport Distance, Any Caching Plugin" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("image-optimizers.php" instead of "optimizers.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin10,562 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
CSS7558295,675
SVG1002,671
PHP252553941,327
JavaScript513734719
JSON300156
Sass12014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.53
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods88
▷ Static methods1213.64%
▷ Public methods7281.82%
▷ Protected methods00.00%
▷ Private methods1618.18%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin