94% wp-eu-vat-helpers

Code Review | WordPress EU VAT Helpers

WordPress plugin WordPress EU VAT Helpers scored 94% from 54 tests.

About plugin

  • Plugin page: wp-eu-vat-helpers
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.0
  • WordPress version: 5.8.1
  • First release: Aug 29, 2017
  • Latest release: Nov 13, 2017
  • Number of updates: 5
  • Update frequency: every 15.2 days
  • Top authors: jsphpl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 486 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲18.99ms] Passed 4 tests

A check of server-side resources used by WordPress EU VAT Helpers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.25160.47 ▲136.74
Dashboard /wp-admin3.25 ▲0.20176.84 ▲129.16
Posts /wp-admin/edit.php3.30 ▲0.20201.81 ▲154.65
Add New Post /wp-admin/post-new.php5.55 ▲0.12312.40 ▼344.61
Media Library /wp-admin/upload.php3.13 ▲0.13262.22 ▲225.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WordPress EU VAT Helpers: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.31 ▲0.819.64 ▲1.6150.20 ▲0.33
Dashboard /wp-admin2,970 ▲365.90 ▲0.00136.01 ▼13.77120.68 ▼3.91
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0167.89 ▼4.2190.46 ▲0.97
Add New Post /wp-admin/post-new.php1,581 ▼10217.42 ▼1.38433.18 ▲54.65134.16 ▲10.67
Media Library /wp-admin/upload.php1,807 ▼34.99 ▼0.03164.28 ▲3.81107.31 ▼11.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-eu-vat-helpers/tests/unit/PluginTest.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\ServiceProvider' not found in wp-content/plugins/wp-eu-vat-helpers/vendor/mpociot/vat-calculator/src/Mpociot/VatCalculator/VatCalculatorServiceProvider.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Routing\\Controller' not found in wp-content/plugins/wp-eu-vat-helpers/vendor/mpociot/vat-calculator/src/controllers/Controller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Route' not found in wp-content/plugins/wp-eu-vat-helpers/vendor/mpociot/vat-calculator/src/routes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SehrGut\\WpEuVatHelpers\\add_shortcode() in wp-content/plugins/wp-eu-vat-helpers/Plugin.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/wp-eu-vat-helpers/vendor/mpociot/vat-calculator/src/Mpociot/VatCalculator/Facades/VatCalculator.php:5

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: tax, localization, vat, eu, mehrwertsteuer...

wp-eu-vat-helpers/wp-eu-vat-helpers.php Passed 13 tests

Analyzing the main PHP file in "WordPress EU VAT Helpers" version 1.1.2
121 characters long description:
WordPress helper shortcodes to display prices including applicable VAT rate for the user's location (based on IP address)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,666 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP222405861,233
JavaScript12484160
JSON300120
Bourne Shell12434105
Markdown27024
XML10022
YAML1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits1
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods87
▷ Static methods44.60%
▷ Public methods7889.66%
▷ Protected methods78.05%
▷ Private methods22.30%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There are no PNG files in this plugin