90% woocommerce-vat-checkout-add

Code Review | WooCommerce VAT

WordPress plugin WooCommerce VAT scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-vat-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 26, 2013
  • Latest release: Sep 2, 2014
  • Number of updates: 7
  • Update frequency: every 43.4 days
  • Top authors: wpdoze (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /3,175 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.01MB] [CPU: ▼4.84ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce VAT
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.54 ▼4.66
Dashboard /wp-admin3.32 ▲0.0144.78 ▼4.98
Posts /wp-admin/edit.php3.37 ▲0.0147.13 ▲2.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.34 ▼10.26
Media Library /wp-admin/upload.php3.24 ▲0.0135.00 ▲0.54

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce VAT
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.13 ▼1.421.56 ▼0.2142.98 ▼0.50
Dashboard /wp-admin2,206 ▲155.88 ▲0.99102.12 ▼5.4840.32 ▼5.84
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0039.26 ▲1.1834.08 ▲0.55
Add New Post /wp-admin/post-new.php1,533 ▲1423.01 ▼0.10632.43 ▼58.7852.65 ▼1.92
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.0097.89 ▼1.6642.46 ▼3.29

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: woocommerce

woocommerce-vat-checkout-add/woocommerce-vat.php 92% from 13 tests

This is the main PHP file of "WooCommerce VAT" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-vat-checkout-add.php" instead of "woocommerce-vat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected38 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2313238

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin