62% wp-resized-image-quality

Code Review | WP Resized Image Quality

WordPress plugin WP Resized Image Quality scored62%from 54 tests.

About plugin

  • Plugin page: wp-resized-image-...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9
  • WordPress version: 6.3.1
  • First release: Feb 23, 2013
  • Latest release: Apr 24, 2014
  • Number of updates: 23
  • Update frequency: every 18.5 days
  • Top authors: mbijon (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /43,864 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.24MB] [CPU: ▼46.92ms] Passed 4 tests

This is a short check of server-side resources used by WP Resized Image Quality
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7318.80 ▼19.67
Dashboard /wp-admin2.78 ▼0.5616.86 ▼47.49
Posts /wp-admin/edit.php2.78 ▼0.5715.85 ▼37.49
Add New Post /wp-admin/post-new.php2.78 ▼3.1018.85 ▼83.03
Media Library /wp-admin/upload.php2.78 ▼0.4517.96 ▼16.97
Image Quality /wp-admin/options-general.php?page=riq-admin2.7818.70

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Resized Image Quality
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3313.62 ▼0.754.81 ▲2.6442.52 ▲0.27
Dashboard /wp-admin2,225 ▲255.85 ▲0.9799.01 ▼18.0837.95 ▼4.93
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0435.27 ▼4.1933.16 ▼3.36
Add New Post /wp-admin/post-new.php1,548 ▲2223.52 ▲5.99695.93 ▲44.2964.39 ▲11.22
Media Library /wp-admin/upload.php1,407 ▲74.30 ▲0.0795.14 ▼3.9147.51 ▲0.59
Image Quality /wp-admin/options-general.php?page=riq-admin8841.8528.7130.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/wp-resized-image-quality/wp-resized-image-quality.php+88
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=riq-admin
    • > Warning in wp-content/plugins/wp-resized-image-quality/wp-resized-image-quality.php+89
    Use of undefined constant WPLANG - assumed 'WPLANG' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=riq-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=riq-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-resized-image-quality/wp-resized-image-quality.php:65
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-resized-image-quality/templates/riq-media-option-template.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-resized-image-quality/templates/riq-admin-page-template.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=riq-admin
    • > Network (severe)
    wp-content/plugins/wp-resized-image-quality/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=riq-admin
    • > Network (severe)
    wp-content/plugins/wp-resized-image-quality/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt might help

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

"WP Resized Image Quality" version 2.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
107 characters long description:
Change the compression-level of uploaded images and thumbnails. Get better image quality or save bandwidth.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,350 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS134471,093
PHP311274204
PO File1111340
JavaScript11213

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png50.41KB19.34KB▼ 61.63%