93% vat-ust-id-checker-validator-eu-for-woocommerce

Code Review | VAT / UST ID Checker - Validator EU for WooCommerce

WordPress plugin VAT / UST ID Checker - Validator EU for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: vat-ust-id-checke...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 5.8.1
  • First release: Oct 6, 2020
  • Latest release: Oct 7, 2020
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: mlfactory (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 275 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼140.41ms] Passed 4 tests

Server-side resources used by VAT / UST ID Checker - Validator EU for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1841.00 ▲11.52
Dashboard /wp-admin3.12 ▲0.0742.86 ▼0.00
Posts /wp-admin/edit.php3.17 ▲0.0737.84 ▼5.57
Add New Post /wp-admin/post-new.php5.48 ▲0.0586.11 ▼555.62
Media Library /wp-admin/upload.php3.07 ▲0.0632.20 ▼0.43

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

VAT / UST ID Checker - Validator EU for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,810 ▲21416.61 ▲1.0612.37 ▲4.3747.61 ▼5.91
Dashboard /wp-admin2,970 ▲365.90 ▼0.05133.78 ▼17.90116.11 ▲7.67
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0163.68 ▼4.9395.18 ▲5.50
Add New Post /wp-admin/post-new.php1,876 ▲20019.20 ▲0.33369.47 ▼6.49108.76 ▲0.54
Media Library /wp-admin/upload.php1,810 ▲35.06 ▲0.06149.84 ▼16.47123.65 ▼9.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'PH7\\Eu\\Vat\\Provider\\Providable' not found in wp-content/plugins/vat-ust-id-checker-validator-eu-for-woocommerce/core/lib/Vat/Provider/Europa.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'PH7\\Eu\\Vat\\Validatable' not found in wp-content/plugins/vat-ust-id-checker-validator-eu-for-woocommerce/core/lib/Vat/Validator.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
5 plugin tags: validator, ustid, reverse charge, vat, woocommerce

vat-ust-id-checker-validator-eu-for-woocommerce/check-tax-vat-id-woo.php 77% from 13 tests

The principal PHP file in "VAT / UST ID Checker - Validator EU for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • 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
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "4.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("vat-ust-id-checker-validator-eu-for-woocommerce.php" instead of "check-tax-vat-id-woo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin422 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP715984367
PO File1101036
JavaScript11019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces3
Interfaces2
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1343.33%
▷ Public methods2996.67%
▷ Protected methods13.33%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin