90% hong-kong-fps-woo-payment

Code Review | Hong Kong FPS Woo Payment

WordPress plugin Hong Kong FPS Woo Payment scored 90% from 54 tests.

About plugin

  • Plugin page: hong-kong-fps-woo...
  • Plugin version: 1.44
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2020
  • Latest release: Dec 24, 2020
  • Number of updates: 14
  • Update frequency: every 10.7 days
  • Top authors: invitefrey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 1,298 total downloads

Benchmarks

Plugin footprint 83% from 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.17MB] [CPU: ▼12.80ms] Passed 4 tests

Server-side resources used by Hong Kong FPS Woo Payment
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.61 ▼1.22
Dashboard /wp-admin3.20 ▼0.1131.87 ▼15.59
Posts /wp-admin/edit.php3.26 ▼0.0933.59 ▼14.36
Add New Post /wp-admin/post-new.php5.44 ▼0.4576.11 ▼19.11
Media Library /wp-admin/upload.php3.20 ▼0.0334.75 ▼2.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hong Kong FPS Woo Payment
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7014.79 ▲0.751.78 ▲0.0943.13 ▼1.95
Dashboard /wp-admin2,211 ▲264.82 ▼0.08114.38 ▲5.4844.83 ▲2.25
Posts /wp-admin/edit.php2,097 ▲112.17 ▲0.1438.60 ▲0.7233.54 ▼2.14
Add New Post /wp-admin/post-new.php1,538 ▲1923.06 ▼0.23639.83 ▼55.7151.22 ▼2.66
Media Library /wp-admin/upload.php1,393 ▲84.31 ▲0.20108.66 ▼2.2348.36 ▲0.90

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
The official readme.txt might help

hong-kong-fps-woo-payment/hong-kong-fps-woo-payment.php Passed 13 tests

The principal PHP file in "Hong Kong FPS Woo Payment" v. 1.44 is loaded by WordPress automatically on each request
133 characters long description:
Woocommerce payment method enabling Hong Kong FPS payments. Displays QR code and FPS payent if to user. Requires manual confirmation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,617 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47555322,617

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.06
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods156
▷ Static methods6139.10%
▷ Public methods14693.59%
▷ Protected methods00.00%
▷ Private methods106.41%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/fps.png5.09KB2.43KB▼ 52.23%