78% simple-image-optimizer

Code Review | Simple Image Optimizer

WordPress plugin Simple Image Optimizer scored78%from 54 tests.

About plugin

  • Plugin page: simple-image-opti...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.3
  • WordPress version: 6.3.1
  • First release: Feb 24, 2018
  • Latest release: Feb 25, 2018
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: eliasmarca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /715 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.00MB] [CPU: ▼2.77ms] Passed 4 tests

A check of server-side resources used by Simple Image Optimizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.32 ▲4.81
Dashboard /wp-admin3.31 ▲0.0155.76 ▼3.08
Posts /wp-admin/edit.php3.36 ▲0.0051.85 ▲3.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.99 ▼9.34
Media Library /wp-admin/upload.php3.23 ▲0.0037.27 ▼2.19
Simple Image Optimizer /wp-admin/options-general.php?page=simple_io_admin_menu3.1731.25

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Simple Image Optimizer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.28 ▼1.071.76 ▼0.3345.08 ▲1.98
Dashboard /wp-admin2,210 ▲224.85 ▼0.96111.61 ▲7.9244.80 ▲2.15
Posts /wp-admin/edit.php2,090 ▼22.02 ▲0.0534.45 ▼16.9835.12 ▼1.49
Add New Post /wp-admin/post-new.php1,536 ▲1723.27 ▼0.14669.65 ▲47.6457.19 ▲5.13
Media Library /wp-admin/upload.php1,395 ▲74.22 ▲0.0495.49 ▼9.1345.48 ▼0.31
Simple Image Optimizer /wp-admin/options-general.php?page=simple_io_admin_menu7832.0625.4025.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_io_admin_menu
    • > Notice in wp-content/plugins/simple-image-optimizer/simple-image-optimizer.php+73
    Undefined index: quality_percentaje

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-image-optimizer/simple-image-optimizer.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt might help

simple-image-optimizer/simple-image-optimizer.php 92% from 13 tests

"Simple Image Optimizer" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 167 characters long)

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
There were no executable files found in this plugin132 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24823132

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected