89% qrcode-payment-for-vietnam

Code Review | QRCode Payment for Vietnam

WordPress plugin QRCode Payment for Vietnam scored89%from 54 tests.

About plugin

  • Plugin page: qrcode-payment-fo...
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2021
  • Latest release: Jun 27, 2021
  • Number of updates: 5
  • Update frequency: every 14.8 days
  • Top authors: bluecoral (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /7,566 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by QRCode Payment for Vietnam
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.50 ▼2.73
Dashboard /wp-admin3.31 ▼0.0454.83 ▼8.60
Posts /wp-admin/edit.php3.36 ▲0.0055.63 ▲9.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.05 ▼20.79
Media Library /wp-admin/upload.php3.23 ▲0.0040.01 ▲4.95

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for QRCode Payment for Vietnam
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▼0.291.68 ▼0.1844.18 ▲2.27
Dashboard /wp-admin2,198 ▲185.57 ▼0.0893.21 ▲3.9741.12 ▲2.65
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.0039.63 ▼1.3236.57 ▼1.58
Add New Post /wp-admin/post-new.php1,528 ▼2123.02 ▲4.87686.15 ▲56.7455.06 ▼8.97
Media Library /wp-admin/upload.php1,403 ▼04.20 ▲0.04106.86 ▲0.3945.05 ▼0.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

qrcode-payment-for-vietnam/qrcode-payment-for-vietnam.php Passed 13 tests

The main PHP file in "QRCode Payment for Vietnam" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
103 characters long description:
Integrate QR Code from VietQR, Momo, ZaloPay, AirPay, ViettelPay, Moca Payment Gateway for Woocommerce.

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
No dangerous file extensions were detected779 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP11128118456
CSS1290146
PO File1333397
JavaScript415080

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity3.56
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.97MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/momo.png28.72KB10.42KB▼ 63.73%
assets/images/moca.png95.69KB29.72KB▼ 68.94%
assets/images/guide-viettelpay.png150.14KB38.26KB▼ 74.52%
assets/images/download.png0.60KB0.41KB▼ 32.25%
assets/images/guide-vietqr.png209.49KB55.97KB▼ 73.28%