83% wpp-faster-payment-systemfps-hong-kong

Code Review | WooCommerce 轉數快 Faster Payment System (FPS) Hong Kong

WordPress plugin WooCommerce 轉數快 Faster Payment System (FPS) Hong Kong scored83%from 54 tests.

About plugin

  • Plugin page: wpp-faster-paymen...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Jan 1, 2019
  • Latest release: Sep 25, 2019
  • Number of updates: 22
  • Update frequency: every 13.2 days
  • Top authors: bearycommerce (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /3,832 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WooCommerce 轉數快 Faster Payment System (FPS) Hong Kong
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.35 ▼1.74
Dashboard /wp-admin3.31 ▲0.0047.85 ▼6.71
Posts /wp-admin/edit.php3.36 ▲0.0047.45 ▼9.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.87 ▼16.47
Media Library /wp-admin/upload.php3.23 ▲0.0038.57 ▼0.92

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce 轉數快 Faster Payment System (FPS) Hong Kong
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▲0.031.75 ▼0.0144.94 ▼2.91
Dashboard /wp-admin2,198 ▲215.65 ▲0.0494.55 ▼4.6442.96 ▲2.29
Posts /wp-admin/edit.php2,082 ▼181.98 ▲0.0234.30 ▼5.5435.65 ▲0.45
Add New Post /wp-admin/post-new.php1,527 ▼1623.15 ▲0.17656.18 ▲21.6857.12 ▲7.41
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.0495.57 ▼14.1844.91 ▼1.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wpp-faster-payment-systemfps-hong-kong/public/partials/wc-fps-reference-number.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wpp-faster-payment-systemfps-hong-kong/includes/payment-methods/class-wc-fps-gateway-offline.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

wpp-faster-payment-systemfps-hong-kong/woocommerce-fps.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce 轉數快 Faster Payment System (FPS) Hong Kong" version 1.0.4
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpp-faster-payment-systemfps-hong-kong.php" instead of "woocommerce-fps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin760 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1371198394
PO File37275243
SVG101122
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3482.93%
▷ Protected methods00.00%
▷ Private methods717.07%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/fps-icon-large.png44.62KB18.88KB▼ 57.70%
public/images/fps-icon-small.png2.55KB1.39KB▼ 45.58%