83% marvinerp-eu-vat

Code Review | Marvinerp VAT Europeu e NIF Português

WordPress plugin Marvinerp VAT Europeu e NIF Portuguêsscored83%from 54 tests.

About plugin

  • Plugin page: marvinerp-eu-vat
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2020
  • Latest release: Nov 5, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: ponto25 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,188 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.38ms] Passed 4 tests

A check of server-side resources used by Marvinerp VAT Europeu e NIF Português
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0048.46 ▲2.41
Dashboard /wp-admin3.31 ▼0.0448.45 ▼23.08
Posts /wp-admin/edit.php3.36 ▲0.0051.31 ▲0.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.50 ▼21.62
Media Library /wp-admin/upload.php3.23 ▲0.0038.20 ▲2.44

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Marvinerp VAT Europeu e NIF Português
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.28 ▼1.101.94 ▲0.2446.44 ▲5.67
Dashboard /wp-admin2,206 ▲154.83 ▼0.03109.28 ▼7.8639.99 ▼0.70
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0441.01 ▲0.3635.96 ▲0.09
Add New Post /wp-admin/post-new.php1,533 ▲1523.29 ▲0.12674.00 ▲33.2457.79 ▲4.10
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0499.30 ▼6.0943.39 ▲0.36

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant MARVIN_VAT_ASSETS - assumed 'MARVIN_VAT_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/marvinerp-eu-vat/assets/home.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/marvinerp-eu-vat/Settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/marvinerp-eu-vat/assets/home.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/marvinerp-eu-vat/main.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === Marvinerp VAT Europeu e NIF Português=== )
You can look at the official readme.txt

marvinerp-eu-vat/main.php 69% from 13 tests

Analyzing the main PHP file in "Marvinerp VAT Europeu e NIF Português" version 1.0
Please make the necessary changes and fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.3" instead of "7.2")
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("marvinerp-eu-vat.php" instead of "main.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "5.2")

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
Everything looks great! No dangerous files found in this plugin190 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32439170
CSS22620

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.83MB with 0.47MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png846.11KB361.29KB▼ 57.30%