84% plus-webp

Code Review | Plus WebP

WordPress plugin Plus WebP scored84%from 54 tests.

About plugin

  • Plugin page: plus-webp
  • Plugin version: 4.04
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: May 14, 2019
  • Latest release: Oct 31, 2023
  • Number of updates: 70
  • Update frequency: every 23.3 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /18,955 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.98ms] Passed 4 tests

This is a short check of server-side resources used by Plus WebP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1433.63 ▼11.10
Dashboard /wp-admin3.44 ▲0.0946.94 ▼14.90
Posts /wp-admin/edit.php3.55 ▲0.1946.92 ▲0.52
Add New Post /wp-admin/post-new.php6.03 ▲0.1482.03 ▼6.44
Media Library /wp-admin/upload.php3.36 ▲0.1336.18 ▲2.06
Plus WebP /wp-admin/upload.php?page=plus-webp3.3438.62

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
pluswebp
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Plus WebP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.361.76 ▼0.0342.73 ▲0.34
Dashboard /wp-admin2,196 ▲165.50 ▼0.1784.09 ▼4.7838.25 ▼2.47
Posts /wp-admin/edit.php2,104 ▲71.95 ▼0.0139.08 ▲2.8436.64 ▼0.98
Add New Post /wp-admin/post-new.php1,529 ▼623.20 ▲4.87665.06 ▲71.6459.31 ▼7.66
Media Library /wp-admin/upload.php1,407 ▲44.18 ▼0.0298.14 ▲0.3343.71 ▲0.81
Plus WebP /wp-admin/upload.php?page=plus-webp1,0407.47179.1032.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/plus-webp/lib/class-pluswebp.php:419
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plus-webp/lib/class-pluswebpadmin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/plus-webp/lib/class-pluswebp.php:419

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: upload, media, webp

plus-webp/pluswebp.php 92% from 13 tests

This is the main PHP file of "Plus WebP" version 4.04, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("plus-webp.php" instead of "pluswebp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,125 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP5126282640
JavaScript6453426
CSS31038
JSON10019
Sass1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity32.50
▷ Minimum class complexity22.00
▷ Maximum class complexity43.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1664.00%
▷ Protected methods00.00%
▷ Private methods936.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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 images were found in this plugin