77% woo-vietnam-checkout

Code Review | Woocommerce Vietnam Checkout

WordPress plugin Woocommerce Vietnam Checkout scored77%from 54 tests.

About plugin

  • Plugin page: woo-vietnam-checkout
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 8.0.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 1, 2018
  • Latest release: Oct 27, 2023
  • Number of updates: 19
  • Update frequency: every 111.9 days
  • Top authors: levantoan (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active /44,846 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼9.18ms] Passed 4 tests

This is a short check of server-side resources used by Woocommerce Vietnam Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.78 ▲0.32
Dashboard /wp-admin3.51 ▲0.1649.56 ▼9.09
Posts /wp-admin/edit.php3.62 ▲0.2645.84 ▼9.20
Add New Post /wp-admin/post-new.php6.09 ▲0.2081.24 ▼18.75
Media Library /wp-admin/upload.php3.43 ▲0.2035.42 ▲2.75

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Vietnam Checkout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.021.65 ▲0.0038.53 ▼0.62
Dashboard /wp-admin2,189 ▲125.54 ▼0.0882.16 ▼7.2837.45 ▼3.72
Posts /wp-admin/edit.php2,097 ▼32.02 ▼0.0035.50 ▼1.1133.69 ▲0.11
Add New Post /wp-admin/post-new.php1,526 ▼923.68 ▲5.19690.36 ▲92.2561.34 ▼0.91
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.03101.97 ▲5.0044.40 ▲1.19

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 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
Please fix the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-vietnam-checkout/cities/quan_huyen_old.php
    • > /wp-content/plugins/woo-vietnam-checkout/devvn-woo-address-selectbox.php
    • > /wp-content/plugins/woo-vietnam-checkout/get-address.php
    • > /wp-content/plugins/woo-vietnam-checkout/cities/tinh_thanhpho_old.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/woo-vietnam-checkout/includes/options-page.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Giao diện Form Checkout.), #2 (Giao diện toàn bộ trang checkout.), #3 (Phần cài đặt của plugin.), #4 (Thông tin được hiển thị trong quản trị đơn hàng.), #5 (Thông tin sau khi đặt hàng.)
Please take inspiration from this readme.txt

woo-vietnam-checkout/devvn-woo-address-selectbox.php 77% from 13 tests

This is the main PHP file of "Woocommerce Vietnam Checkout" version 2.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-vietnam-checkout.php" instead of "devvn-woo-address-selectbox.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.3" instead of "8.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin15,457 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP112407513,873
CSS310911680
JavaScript33217639
PO File1121146265

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity89.00
▷ Minimum class complexity8.00
▷ Maximum class complexity204.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods72
▷ Static methods56.94%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
18 PNG files occupy 0.28MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_65_ffffff_1x400.png0.08KB0.10KB0.00%
assets/css/images/ui-bg_glass_75_dadada_1x400.png0.09KB0.16KB0.00%
screenshot-4.png29.61KB16.09KB▼ 45.66%
screenshot-2.png137.26KB36.57KB▼ 73.36%
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%