90% image-quality

Code Review | Image Quality

WordPress plugin Image Quality scored 90% from 54 tests.

About plugin

  • Plugin page: image-quality
  • Plugin version: 1.5.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: May 27, 2023
  • Number of updates: 22
  • Update frequency: every 102.5 days
  • Top authors: gagan0123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 23,463 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.56ms] Passed 4 tests

A check of server-side resources used by Image Quality
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.11 ▼4.00
Dashboard /wp-admin3.34 ▲0.0344.31 ▼8.45
Posts /wp-admin/edit.php3.39 ▲0.0347.58 ▲0.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.62 ▲2.95
Media Library /wp-admin/upload.php3.26 ▲0.0335.63 ▲2.05

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Quality
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.171.87 ▼0.0842.54 ▼1.52
Dashboard /wp-admin2,209 ▲214.88 ▼0.17107.58 ▼8.5241.63 ▼11.46
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0139.83 ▲6.2036.65 ▲1.23
Add New Post /wp-admin/post-new.php1,546 ▲1318.13 ▼5.00598.81 ▼48.2271.98 ▲13.13
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0193.67 ▼9.6842.73 ▼2.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

image-quality/image-quality.php Passed 13 tests

"Image Quality" version 1.5.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
75 characters long description:
Plugin to let you adjust compression ratio WordPress uses in media settings

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin124 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP450211124

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin