90% webp-uploads

Code Review | WebP Uploads

WordPress plugin WebP Uploads scored90%from 54 tests.

About plugin

  • Plugin page: webp-uploads
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.3
  • WordPress version: 6.3.1
  • First release: Apr 6, 2023
  • Latest release: Oct 16, 2023
  • Number of updates: 6
  • Update frequency: every 33.5 days
  • Top authors: performanceteam (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,534 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.16MB] [CPU: ▼2.74ms] Passed 4 tests

Server-side resources used by WebP Uploads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1739.62 ▼8.93
Dashboard /wp-admin3.48 ▲0.1361.74 ▼3.47
Posts /wp-admin/edit.php3.59 ▲0.2346.89 ▲0.70
Add New Post /wp-admin/post-new.php6.06 ▲0.1799.22 ▲0.75
Media Library /wp-admin/upload.php3.40 ▲0.1736.22 ▲2.65

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WebP Uploads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲3014.35 ▼0.002.05 ▲0.0444.42 ▲1.44
Dashboard /wp-admin2,198 ▲215.63 ▼0.0881.39 ▼5.7338.34 ▼1.29
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0333.54 ▼4.0933.63 ▼3.49
Add New Post /wp-admin/post-new.php1,529 ▲123.09 ▲0.16575.10 ▼83.6057.25 ▼0.49
Media Library /wp-admin/upload.php1,400 ▼34.18 ▲0.0195.62 ▲0.5440.46 ▼1.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: webp, images, performance

webp-uploads/load.php 92% from 13 tests

"WebP Uploads" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("webp-uploads.php" instead of "load.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,062 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7235572955
JavaScript122795
SVG10012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions35
▷ Named functions3188.57%
▷ Anonymous functions411.43%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/icon-128x128.png12.53KB1.90KB▼ 84.80%
.wordpress-org/banner-1544x500.png258.37KB154.41KB▼ 40.24%
.wordpress-org/icon-256x256.png5.24KB2.43KB▼ 53.59%
.wordpress-org/banner-772x250.png55.35KB26.04KB▼ 52.95%