90% qr-pay-gateway

Code Review | QR Payments Gateway

WordPress plugin QR Payments Gateway scored90%from 54 tests.

About plugin

  • Plugin page: qr-pay-gateway
  • Plugin version: 1.1.5
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3+
  • WordPress version: 6.3.1
  • First release: Nov 28, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: sureshramasamy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /81 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by QR Payments Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.26 ▼0.45
Dashboard /wp-admin3.31 ▲0.0046.89 ▼12.48
Posts /wp-admin/edit.php3.36 ▲0.0047.71 ▼4.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.76 ▲1.26
Media Library /wp-admin/upload.php3.23 ▲0.0035.79 ▼0.85

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for QR Payments Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.23 ▼0.111.64 ▼0.2137.49 ▼0.38
Dashboard /wp-admin2,189 ▲145.56 ▼0.0096.03 ▼23.6342.36 ▼4.97
Posts /wp-admin/edit.php2,100 ▼31.96 ▲0.0140.36 ▼1.4135.95 ▼6.48
Add New Post /wp-admin/post-new.php1,526 ▼1023.17 ▲0.12636.71 ▲36.6152.11 ▼1.95
Media Library /wp-admin/upload.php1,403 ▲94.19 ▼0.0199.19 ▲1.9240.24 ▼2.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

qr-pay-gateway/qr-pay-gateway.php Passed 13 tests

The main PHP file in "QR Payments Gateway" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
92 characters long description:
QR Payments For Woocommerce Payment Gateway For Touch N Go, DuitNow, Grab, Shopee Pay, Boost

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected276 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP251102276

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity2.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/duitnow-ewallet-logo.png3.97KB1.88KB▼ 52.59%
assets/images/boost-ewallet-logo.png4.38KB2.09KB▼ 52.33%
assets/images/shopeepay-ewallet-logo.png3.45KB1.72KB▼ 50.14%
assets/images/grabpay-ewallet-logo.png5.42KB2.32KB▼ 57.11%
assets/images/tng-ewallet-logo.png5.89KB2.44KB▼ 58.55%