72% thanh-toan-qrcode

Code Review | Tích Hợp Thanh Toán Quét Mã QR Code Tự Động – MoMo, ViettelPay, MB, Vietcombank, Vietinbank, Techcombank, Agribank, ACB, BIDV

WordPress plugin Tích Hợp Thanh Toán Quét Mã QR Code Tự Động – MoMo, ViettelPay, MB, Vietcombank, Vietinbank, Techcombank, Agribank, ACB, BIDV scored72%from 54 tests.

About plugin

  • Plugin page: thanh-toan-qrcode
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 10, 2022
  • Latest release: Oct 11, 2023
  • Number of updates: 18
  • Update frequency: every 23.8 days
  • Top authors: qrpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /9,258 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Tích Hợp Thanh Toán Quét Mã QR Code Tự Động – MoMo, ViettelPay, MB, Vietcombank, Vietinbank, Techcombank, Agribank, ACB, BIDV
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.77 ▼0.84
Dashboard /wp-admin3.31 ▲0.0052.09 ▲4.14
Posts /wp-admin/edit.php3.36 ▲0.0060.89 ▲14.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.04 ▲7.31
Media Library /wp-admin/upload.php3.23 ▲0.0036.06 ▲1.17

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 229 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Tích Hợp Thanh Toán Quét Mã QR Code Tự Động – MoMo, ViettelPay, MB, Vietcombank, Vietinbank, Techcombank, Agribank, ACB, BIDV
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.411.66 ▼0.2838.42 ▼3.15
Dashboard /wp-admin2,195 ▲185.55 ▼0.08102.16 ▲8.2148.28 ▲7.83
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0241.54 ▲3.8237.48 ▼0.30
Add New Post /wp-admin/post-new.php1,526 ▼1123.00 ▲4.90712.72 ▲87.1468.18 ▲3.03
Media Library /wp-admin/upload.php1,400 ▲64.16 ▼0.11103.08 ▼2.9048.24 ▲1.94

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/thanh-toan-qrcode/inc/functions.php:150

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
  • Screenshots: Add images for these screenshots: #8 (Hiển thị các thông báo số dư theo nội dung chuyển khoản), #9 (Xem chi tiết lịch sử thông báo), #10 (Menu điều hướng), #11 (Cài đặt thông báo & kết nối website), #12 (Quét mã QR để kết nối website)
Please take inspiration from this readme.txt

thanh-toan-qrcode/ttqr.php 69% from 13 tests

Analyzing the main PHP file in "Tích Hợp Thanh Toán Quét Mã QR Code Tự Động – MoMo, ViettelPay, MB, Vietcombank, Vietinbank, Techcombank, Agribank, ACB, BIDV" version 1.2.1
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 98 characters long)
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("thanh-toan-qrcode.php" instead of "ttqr.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/thanh-toan-qrcode/lib/phpqrcode/tools/merge.bat
11,001 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP731,8332,7968,892
JavaScript22371721,841
PO File181101180
CSS15384
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.59
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes87
▷ Abstract classes11.15%
▷ Concrete classes8698.85%
▷ Final classes00.00%
Methods514
▷ Static methods13426.07%
▷ Public methods41480.54%
▷ Protected methods9618.68%
▷ Private methods40.78%
Functions26
▷ Named functions1453.85%
▷ Anonymous functions1246.15%
Constants100
▷ Global constants100100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
59 PNG files occupy 1.59MB with 1.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/seabank.png13.19KB0.00KB▼ 100.00%
assets/shopeepay.png14.35KB6.96KB▼ 51.53%
assets/moca.png15.48KB8.80KB▼ 43.12%
(invalid) assets/momo.png1.18KB0.00KB▼ 100.00%
assets/lvp.png26.04KB10.29KB▼ 60.47%