89% casso-tu-dong-xac-nhan-thanh-toan-chuyen-khoan-ngan-hang

Code Review | Casso - Tự động xác nhận thanh toán chuyển khoản ngân hàng

WordPress plugin Casso - Tự động xác nhận thanh toán chuyển khoản ngân hàng scored89%from 54 tests.

About plugin

  • Plugin page: casso-tu-dong-xac...
  • Plugin version: 3.3.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 24, 2020
  • Latest release: Mar 14, 2023
  • Number of updates: 45
  • Update frequency: every 18.8 days
  • Top authors: diepmagik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,102 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.34ms] Passed 4 tests

An overview of server-side resources used by Casso - Tự động xác nhận thanh toán chuyển khoản ngân hàng
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.41 ▼0.18
Dashboard /wp-admin3.40 ▲0.0652.99 ▼10.84
Posts /wp-admin/edit.php3.52 ▲0.1649.03 ▼4.11
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.91 ▼14.23
Media Library /wp-admin/upload.php3.33 ▲0.1037.72 ▲0.29

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Casso - Tự động xác nhận thanh toán chuyển khoản ngân hàng
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.16 ▼1.431.85 ▼0.0947.50 ▲4.89
Dashboard /wp-admin2,211 ▲234.86 ▼1.03107.76 ▲0.9138.12 ▼3.99
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0040.76 ▲0.3237.80 ▲1.74
Add New Post /wp-admin/post-new.php1,519 ▼923.45 ▲0.41683.87 ▲59.8661.81 ▲2.76
Media Library /wp-admin/upload.php1,393 ▲24.20 ▲0.00102.78 ▼0.2642.33 ▼2.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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 86% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Contributors: Contributors not specified
The official readme.txt might help

casso-tu-dong-xac-nhan-thanh-toan-chuyen-khoan-ngan-hang/wc-gateway-casso.php 77% from 13 tests

Analyzing the main PHP file in "Casso - Tự động xác nhận thanh toán chuyển khoản ngân hàng" version 3.3.1
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Plugin Name: Please shorten the plugin name (currently 73 characters long instead of max. 70)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("casso-tu-dong-xac-nhan-thanh-toan-chuyen-khoan-ngan-hang.php" instead of "wc-gateway-casso.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 plugin2,133 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP142003451,916
PO File170103197
CSS13020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.57
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods74
▷ Static methods1317.57%
▷ Public methods7297.30%
▷ Protected methods00.00%
▷ Private methods22.70%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants2
▷ Global constants2100.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
13 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/success-icon.png33.46KB14.16KB▼ 57.69%
assets/vietinbank.png7.29KB3.69KB▼ 49.38%
assets/ocb.png0.97KB0.73KB▼ 24.44%
assets/acb.png4.54KB2.65KB▼ 41.66%
assets/sacombank.png6.23KB3.28KB▼ 47.27%