89% woo-viet

Code Review | Woo Viet - WooCommerce for Vietnam

WordPress plugin Woo Viet - WooCommerce for Vietnam scored89%from 54 tests.

About plugin

  • Plugin page: woo-viet
  • Plugin version: 1.5.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Oct 2, 2021
  • Number of updates: 35
  • Update frequency: every 49.5 days
  • Top authors: htdat (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

7,000+ active /38,864 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.83ms] Passed 4 tests

Analyzing server-side resources used by Woo Viet - WooCommerce for Vietnam
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0333.83 ▼2.42
Dashboard /wp-admin3.34 ▲0.0353.11 ▲2.54
Posts /wp-admin/edit.php3.39 ▲0.0345.67 ▼1.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.94 ▼21.62
Media Library /wp-admin/upload.php3.26 ▲0.0336.46 ▲3.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Viet - WooCommerce for Vietnam
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.45 ▼0.931.79 ▲0.0738.42 ▼1.22
Dashboard /wp-admin2,202 ▲115.83 ▲0.96100.80 ▼5.8141.99 ▼0.36
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0035.35 ▼4.2732.28 ▼3.61
Add New Post /wp-admin/post-new.php1,542 ▲923.60 ▲0.28664.89 ▲66.0353.29 ▲3.99
Media Library /wp-admin/upload.php1,393 ▲84.25 ▼0.0496.05 ▼3.4040.03 ▼6.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

woo-viet/woo-viet.php 85% from 13 tests

The entry point to "Woo Viet - WooCommerce for Vietnam" version 1.5.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("4.3" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,753 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP163545903,504
JavaScript2349151
CSS111049
Markdown128049

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.31
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods77
▷ Static methods33.90%
▷ Public methods7597.40%
▷ Protected methods22.60%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/wooviet_onepay_international.png13.59KB13.56KB0.20%
assets/wooviet_onepay_domestic.png21.36KB22.10KB0.00%