90% vat-moss

Code Review | VAT MOSS Returns

WordPress plugin VAT MOSS Returns scored 90% from 53 tests.

About plugin

  • Plugin page: vat-moss
  • Plugin version: 1.0.29
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.9.7
  • WordPress version: 5.8.1
  • First release: Feb 17, 2015
  • Latest release: Jan 8, 2019
  • Number of updates: 42
  • Update frequency: every 34.0 days
  • Top authors: bseddon (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 1,730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.03MB] [CPU: ▼259.10ms] Passed 4 tests

Analyzing server-side resources used by VAT MOSS Returns
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.08 ▲0.3634.02 ▲12.57
Dashboard /wp-admin4.31 ▲1.2656.95 ▲4.67
Posts /wp-admin/edit.php4.42 ▲1.3249.66 ▲1.50
Add New Post /wp-admin/post-new.php6.68 ▲1.25102.08 ▼1,043.14
Media Library /wp-admin/upload.php4.25 ▲1.2539.61 ▲0.59
Settings /wp-admin/admin.php?page=moss-submissions-settings4.2334.44
Submissions /wp-admin/admin.php?page=moss-submissions4.2446.01

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 1 new option
New WordPress options
moss_settings

Browser metrics Passed 4 tests

VAT MOSS Returns: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲12116.39 ▲0.857.30 ▼1.2346.49 ▼0.36
Dashboard /wp-admin3,030 ▲1806.96 ▲1.10133.24 ▼10.41107.80 ▲5.32
Posts /wp-admin/edit.php2,790 ▲842.78 ▲0.0965.48 ▲1.3698.80 ▲11.34
Add New Post /wp-admin/post-new.php1,700 ▲21918.91 ▲0.66354.69 ▼8.36132.93 ▲25.25
Media Library /wp-admin/upload.php1,853 ▲815.23 ▲0.20129.70 ▼17.89111.10 ▼4.24
Settings /wp-admin/admin.php?page=moss-submissions-settings1,0981.9675.3488.99
Submissions /wp-admin/admin.php?page=moss-submissions1,7142.8472.3375.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • moss_settings

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 27 tag instead of maximum 10
You can look at the official readme.txt

vat-moss/vat-moss.php Passed 13 tests

The main PHP script in "VAT MOSS Returns" version 1.0.29 is automatically included on every request by WordPress
55 characters long description:
Management and submission of VAT sales to EU consumers.

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
No dangerous file extensions were detected10,364 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP271,3942,4035,107
XML1003,208
PO File36851,0181,599
JavaScript35153313
CSS1286136
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity32.29
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods170
▷ Static methods42.35%
▷ Public methods16697.65%
▷ Protected methods42.35%
▷ Private methods00.00%
Functions108
▷ Named functions8881.48%
▷ Anonymous functions2018.52%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin