73% imghaste

Code Review | AVIF, WebP, Image Optimization, CDN, Service Worker & Client Hints All in One

WordPress plugin AVIF, WebP, Image Optimization, CDN, Service Worker & Client Hints All in One scored 73% from 54 tests.

About plugin

  • Plugin page: imghaste
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6.0
  • WordPress version: 6.3.1
  • First release: Jun 5, 2020
  • Latest release: Nov 26, 2021
  • Number of updates: 30
  • Update frequency: every 18.0 days
  • Top authors: imghaste (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active / 7,808 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.14MB] [CPU: ▼9.24ms] Passed 4 tests

Analyzing server-side resources used by AVIF, WebP, Image Optimization, CDN, Service Worker & Client Hints All in One
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.87 ▼5.05
Dashboard /wp-admin3.22 ▼0.0836.42 ▼11.54
Posts /wp-admin/edit.php3.29 ▼0.0738.55 ▼10.12
Add New Post /wp-admin/post-new.php5.46 ▼0.4273.35 ▼10.26
Media Library /wp-admin/upload.php3.23 ▼0.0029.42 ▼3.44
IMGHaste /wp-admin/options-general.php?page=imghaste3.2029.86

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for AVIF, WebP, Image Optimization, CDN, Service Worker & Client Hints All in One
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7813.22 ▼1.181.55 ▼0.4339.74 ▼9.66
Dashboard /wp-admin2,216 ▲284.85 ▼0.03107.54 ▲4.6041.31 ▼0.33
Posts /wp-admin/edit.php2,104 ▲152.04 ▲0.0338.41 ▼2.6735.11 ▲0.13
Add New Post /wp-admin/post-new.php1,546 ▲1223.45 ▲0.45683.19 ▲0.9855.19 ▲4.57
Media Library /wp-admin/upload.php1,395 ▲44.18 ▼0.03103.17 ▼1.4550.22 ▲8.02
IMGHaste /wp-admin/options-general.php?page=imghaste1,1182.0323.6928.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=imghaste
    • > Notice in wp-content/plugins/imghaste/admin/class-imghaste-admin.php+431
    Trying to access array offset on value of type bool

SRP 50% 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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Imghaste_Public' not found in wp-content/plugins/imghaste/public/inc/class-imghaste-buffer.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Imghaste_Public' not found in wp-content/plugins/imghaste/public/inc/class-imghaste-slimcss.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Imghaste_Public' not found in wp-content/plugins/imghaste/public/inc/class-imghaste-overwrite.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=imghaste
    • > Javascript (severe) in unknown
    /wp-content/plugins/imghaste/admin/js/plugin-imghaste-settings.js?ver=1.2.0 3:75 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #3, #4, #5, #6 in imghaste/assets to your readme.txt
The official readme.txt might help

imghaste/imghaste.php Passed 13 tests

The primary PHP file in "AVIF, WebP, Image Optimization, CDN, Service Worker & Client Hints All in One" version 1.2.0 is used by WordPress to initiate all plugin functionality
63 characters long description:
Get your images run with the speed of light all over the world.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,283 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP206301,1542,055
XML11285
JavaScript2121484
YAML351052
Markdown1407

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.35
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods90
▷ Static methods1011.11%
▷ Public methods8088.89%
▷ Protected methods55.56%
▷ Private methods55.56%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin