83% thueapi-thanh-toan-don-gian-voi-he-thong-tu-dong

Code Review | ThueAPI – Tạo QRcode Banking thanh toán tự động

WordPress plugin ThueAPI – Tạo QRcode Banking thanh toán tự động scored83%from 54 tests.

About plugin

  • Plugin page: thueapi-thanh-toa...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 28, 2021
  • Latest release: Aug 23, 2023
  • Number of updates: 43
  • Update frequency: every 19.7 days
  • Top authors: codetay (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by ThueAPI – Tạo QRcode Banking thanh toán tự động
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.61 ▼0.92
Dashboard /wp-admin3.32 ▲0.0145.13 ▼4.68
Posts /wp-admin/edit.php3.37 ▲0.0147.44 ▼1.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.37 ▼18.07
Media Library /wp-admin/upload.php3.24 ▲0.0133.97 ▼7.84

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by ThueAPI – Tạo QRcode Banking thanh toán tự động
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.161.82 ▲0.0639.86 ▲0.32
Dashboard /wp-admin2,209 ▲214.87 ▼0.0398.50 ▼6.3239.11 ▼2.54
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0039.33 ▲1.2834.73 ▲0.18
Add New Post /wp-admin/post-new.php1,542 ▲2318.25 ▼5.08633.27 ▼40.3952.31 ▲0.87
Media Library /wp-admin/upload.php1,385 ▼34.27 ▲0.0797.49 ▼13.7741.09 ▼6.91

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/thueapi-thanh-toan-don-gian-voi-he-thong-tu-dong/thueapi-for-woocommerce.php
    • > /wp-content/plugins/thueapi-thanh-toan-don-gian-voi-he-thong-tu-dong/classes/wc-thueapi.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt might help

thueapi-thanh-toan-don-gian-voi-he-thong-tu-dong/thueapi-for-woocommerce.php 77% from 13 tests

The main PHP script in "ThueAPI – Tạo QRcode Banking thanh toán tự động" version 1.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("thueapi-thanh-toan-don-gian-voi-he-thong-tu-dong.php" instead of "thueapi-for-woocommerce.php")
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 83 characters long)
  • Description: Please keep the plugin description shorter than 140 characters (currently 250 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin536 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP28413527
JSON1004
CSS2002
JavaScript2002
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods975.00%
▷ Protected methods18.33%
▷ Private methods216.67%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banks/timoplus.png11.49KB6.16KB▼ 46.40%
assets/images/banks/tpbank.png30.94KB5.37KB▼ 82.64%
assets/images/banks/mbbank.png17.47KB9.16KB▼ 47.60%
assets/images/banks/bidv.png25.35KB4.18KB▼ 83.51%
assets/images/banks/acb.png5.71KB4.50KB▼ 21.09%