10% eas-eu-compliance

Code Review | EAS EU compliance

WordPress plugin EAS EU compliance scored10%from 54 tests.

About plugin

  • Plugin page: eas-eu-compliance
  • Plugin version: 1.4.92
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2022
  • Latest release: Oct 23, 2023
  • Number of updates: 116
  • Update frequency: every 4.1 days
  • Top authors: easyaccesssystem (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /2,157 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Error in wp-content/plugins/eas-eu-compliance/EAScompliance.php+182
    Uncaught Error: Call to undefined function wc_get_base_location() in wp-content/plugins/eas-eu-compliance/EAScompliance.php:182
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): eascompliance_plugin_activation()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

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

An overview of server-side resources used by EAS EU compliance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.91 ▲4.58
Dashboard /wp-admin3.31 ▼0.0443.03 ▼15.60
Posts /wp-admin/edit.php3.36 ▲0.0045.48 ▼0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.64 ▼6.43
Media Library /wp-admin/upload.php3.23 ▲0.0034.38 ▼2.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EAS EU compliance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.43 ▲0.071.83 ▲0.2340.86 ▲0.28
Dashboard /wp-admin2,195 ▲205.56 ▼0.0688.95 ▼12.0040.04 ▲1.63
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0535.69 ▼3.3030.61 ▼5.10
Add New Post /wp-admin/post-new.php1,529 ▲323.63 ▲0.72616.63 ▼32.0752.90 ▼1.70
Media Library /wp-admin/upload.php1,400 ▲34.31 ▲0.1597.97 ▼4.9446.92 ▲0.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 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 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/eas-eu-compliance/EAScompliance.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: eu vat, vat returns, full landed cost, oss, vat calculator...

eas-eu-compliance/EAScompliance.php 85% from 13 tests

The main PHP file in "EAS EU compliance" ver. 1.4.92 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("eas-eu-compliance.php" instead of "EAScompliance.php")
  • Description: The description should be shorter than 140 characters (currently 435 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected11,403 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PO File111,7932,3145,631
PHP31,1431,0385,210
JavaScript28646486
CSS212054
Markdown11022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions121
▷ Named functions12099.17%
▷ Anonymous functions10.83%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ 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
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
doc/static/Plugin_logo.png72.19KB27.94KB▼ 61.29%
assets/images/pluginlogo_woocommerce.png22.79KB9.55KB▼ 58.07%