78% optimize-more-images

Code Review | Optimize More! - Images

WordPress plugin Optimize More! - Images scored78%from 54 tests.

About plugin

  • Plugin page: optimize-more-images
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2022
  • Latest release: May 21, 2023
  • Number of updates: 24
  • Update frequency: every 20.5 days
  • Top authors: aryadhiratara (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /4,427 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲1.14ms] Passed 4 tests

An overview of server-side resources used by Optimize More! - Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1052.20 ▲9.43
Dashboard /wp-admin3.41 ▲0.1049.20 ▼4.65
Posts /wp-admin/edit.php3.52 ▲0.1650.99 ▲3.03
Add New Post /wp-admin/post-new.php5.99 ▲0.1099.48 ▲5.28
Media Library /wp-admin/upload.php3.33 ▲0.1036.73 ▲0.91
Optimize More! /wp-admin/admin.php?page=optimize-more-images3.3340.71

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Optimize More! - Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲7213.24 ▼1.072.33 ▲0.3545.62 ▲2.38
Dashboard /wp-admin2,261 ▲585.81 ▲0.9499.50 ▼8.0843.42 ▼3.30
Posts /wp-admin/edit.php2,143 ▲432.04 ▲0.0242.20 ▲6.3038.12 ▼0.40
Add New Post /wp-admin/post-new.php1,571 ▲2322.91 ▼0.44585.72 ▼74.2458.21 ▼6.33
Media Library /wp-admin/upload.php1,446 ▲464.33 ▲0.16100.57 ▼10.3643.37 ▼3.80
Optimize More! /wp-admin/admin.php?page=optimize-more-images1,7904.3281.8151.59

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 14× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/optimize-more-images/view/admin/parts/partials/sidebar.php
    • > /wp-content/plugins/optimize-more-images/index.php
    • > /wp-content/plugins/optimize-more-images/includes/index.php
    • > /wp-content/plugins/optimize-more-images/public/index.php
    • > /wp-content/plugins/optimize-more-images/includes/classes/partials/index.php
    • > /wp-content/plugins/optimize-more-images/view/admin/parts/index.php
    • > /wp-content/plugins/optimize-more-images/view/index.php
    • > /wp-content/plugins/optimize-more-images/includes/classes/index.php
    • > /wp-content/plugins/optimize-more-images/view/admin/index.php
    • > /wp-content/plugins/optimize-more-images/assets/index.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/optimize-more-images/view/admin/parts/extras.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/optimize-more-images/view/admin/parts/partials/use-img-cdn.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/optimize-more-images/view/admin/parts/partials/lazy-load-simple-lozad.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/optimize-more-images/view/admin/parts/lazyload.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/optimize-more-images/view/admin/parts/partials/images-dimensions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/optimize-more-images/view/admin/parts/partials/lazy-load-css-bg-image.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/optimize-more-images/view/admin/parts/partials/preload-images.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/optimize-more-images/view/admin/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/optimize-more-images/view/admin/parts/partials/lazy-load-extra-config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/optimize-more-images/view/admin/parts/import-settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: web vitals, lazyload, core web vitals, lazy load, preload...

optimize-more-images/optimize-more-images.php 85% from 13 tests

The main PHP file in "Optimize More! - Images" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 161 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,699 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP286661361,770
CSS212116808
JavaScript524121

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity20.55
▷ Minimum class complexity7.00
▷ Maximum class complexity50.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods68
▷ Static methods34.41%
▷ Public methods6595.59%
▷ Protected methods11.47%
▷ Private methods22.94%
Functions24
▷ Named functions1041.67%
▷ Anonymous functions1458.33%
Constants24
▷ Global constants1250.00%
▷ Class constants1250.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin