89% images-to-webp

Code Review | Images to WebP

WordPress plugin Images to WebP scored89%from 54 tests.

About plugin

  • Plugin page: images-to-webp
  • Plugin version: 4.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Nov 17, 2019
  • Latest release: Oct 25, 2023
  • Number of updates: 68
  • Update frequency: every 21.1 days
  • Top authors: kubiq (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

8,000+ active /76,719 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.14ms] Passed 4 tests

Analyzing server-side resources used by Images to WebP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.15 ▼2.92
Dashboard /wp-admin3.31 ▲0.0044.87 ▼6.55
Posts /wp-admin/edit.php3.36 ▲0.0045.40 ▼1.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.28 ▼5.80
Media Library /wp-admin/upload.php3.23 ▲0.0033.63 ▲1.01

Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification found: 1 file (0.92KB) outside of "wp-content/plugins/images-to-webp/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Images to WebP: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.29 ▼0.061.57 ▲0.0152.59 ▲14.96
Dashboard /wp-admin2,198 ▲175.63 ▼0.0384.96 ▼13.6840.11 ▲1.73
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0336.31 ▲1.4731.14 ▼2.08
Add New Post /wp-admin/post-new.php1,528 ▲222.88 ▼0.28678.25 ▼28.1557.72 ▲0.88
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0296.12 ▼0.2541.31 ▼2.78

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in images-to-webp/assets to your readme.txt
The official readme.txt is a good inspiration

images-to-webp/images-to-webp.php Passed 13 tests

The primary PHP file in "Images to WebP" version 4.5 is used by WordPress to initiate all plugin functionality
58 characters long description:
Convert JPG, PNG and GIF images to WEBP, speed up your web

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 plugin756 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP78915668
JavaScript22187
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity23.33
▷ Minimum class complexity2.00
▷ Maximum class complexity66.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/40px.png1.57KB1.84KB0.00%
tests/test.png0.42KB0.49KB0.00%
assets/32px.png5.16KB2.93KB▼ 43.29%