99% hiwebp

Code Review | HiWebP

WordPress plugin HiWebP scored 99% from 54 tests.

About plugin

  • Plugin page: hiwebp
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6.1
  • WordPress version: 5.9.2
  • First release: Dec 5, 2020
  • Latest release: Feb 4, 2021
  • Number of updates: 10
  • Update frequency: every 6.1 days
  • Top authors: themefour (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 408 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼294.14ms] Passed 4 tests

A check of server-side resources used by HiWebP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0361.67 ▲8.68
Dashboard /wp-admin3.45 ▲0.0433.46 ▼8.11
Posts /wp-admin/edit.php3.67 ▲0.0338.90 ▼0.58
Add New Post /wp-admin/post-new.php6.92 ▼0.06101.72 ▼1,175.44
Media Library /wp-admin/upload.php3.33 ▲0.0331.76 ▲7.56
HiWebP /wp-admin/options-general.php?page=hi-webp3.2925.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by HiWebP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,770 ▲1615.88 ▲0.566.85 ▼0.032.32 ▼0.45
Dashboard /wp-admin2,896 ▲366.14 ▲0.04127.72 ▲2.97234.99 ▲71.16
Posts /wp-admin/edit.php2,695 ▲73.22 ▼0.0163.85 ▼0.57224.88 ▲73.07
Add New Post /wp-admin/post-new.php1,716 ▲5520.70 ▲4.39459.70 ▲24.48167.14 ▼44.61
Media Library /wp-admin/upload.php1,705 ▲75.55 ▲0.03143.99 ▲2.89194.70 ▼61.50
HiWebP /wp-admin/options-general.php?page=hi-webp1,0832.4198.46128.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Donate link: Invalid url: ""
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

hiwebp/hiwebp.php 92% from 13 tests

This is the main PHP file of "HiWebP" version 1.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected274 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP63646162
PO File1252686
CSS131526

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions7
▷ Named functions7100.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
4 PNG files occupy 0.28MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png156.56KB52.94KB▼ 66.19%
screenshot-3.png21.82KB22.12KB0.00%
hiwebp.png22.94KB8.59KB▼ 62.55%
screenshot-1.png87.29KB32.96KB▼ 62.24%