89% eu-vat-redirect

Code Review | EU VAT Redirect

WordPress plugin EU VAT Redirect scored 89% from 54 tests.

About plugin

  • Plugin page: eu-vat-redirect
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 5.9.2
  • First release: Dec 18, 2014
  • Latest release: Feb 15, 2016
  • Number of updates: 45
  • Update frequency: every 9.4 days
  • Top authors: andrewpaulbowden (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,100 total downloads

Benchmarks

Plugin footprint Passed 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.08MB] [CPU: ▼295.56ms] Passed 4 tests

Server-side resources used by EU VAT Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1762.31 ▲10.92
Dashboard /wp-admin3.52 ▲0.11219.64 ▲186.39
Posts /wp-admin/edit.php3.73 ▲0.0937.58 ▼0.80
Add New Post /wp-admin/post-new.php6.97 ▲0.0092.46 ▼1,191.83
Media Library /wp-admin/upload.php3.38 ▲0.0924.46 ▼0.51
EU VAT Redirect /wp-admin/options-general.php?page=eu-vat-redirect3.3525.09

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 3 new options
New WordPress options
euvat_confirmslug_id
euvat_db_update
euvat_locationslug_id

Browser metrics Passed 4 tests

An overview of browser requirements for EU VAT Redirect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,798 ▲4416.33 ▲0.446.45 ▲0.082.52 ▼1.06
Dashboard /wp-admin2,897 ▲366.37 ▼0.04120.51 ▼12.98156.45 ▼5.99
Posts /wp-admin/edit.php2,696 ▲23.42 ▼0.1463.10 ▼0.56139.03 ▼12.10
Add New Post /wp-admin/post-new.php1,755 ▲3821.20 ▲3.22472.43 ▲46.26171.70 ▲12.35
Media Library /wp-admin/upload.php1,706 ▲55.73 ▲0.01141.33 ▲4.66191.60 ▲6.42
EU VAT Redirect /wp-admin/options-general.php?page=eu-vat-redirect1,1432.6356.68132.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 50% from 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 0% from 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/eu-vat-redirect/eu-vat-redirect.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eu-vat-redirect/eu-vat-redirect-admin.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: tax, payment processors, ip, vat, geo location...

eu-vat-redirect/eu-vat-redirect.php Passed 13 tests

The main file in "EU VAT Redirect" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
Allows you to set buy links differently for visitors from the EU and outside the EU, for VAT purposes.

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
Success! There were no dangerous files found in this plugin929 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP315668566
Pascal1451,557279
CSS13063
JavaScript13021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin