10% role-based-tax-exclusion

Code Review | Role Based Tax Exclusion

WordPress plugin Role Based Tax Exclusion scored10%from 54 tests.

About plugin

  • Plugin page: role-based-tax-ex...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jan 27, 2023
  • Latest release: Nov 4, 2023
  • Number of updates: 11
  • Update frequency: every 25.6 days
  • Top authors: orwokki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,448 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/role-based-tax-exclusion/role-based-tax-exclusion.php+45
    Uncaught Error: Call to undefined function wp_get_active_network_plugins() in wp-content/plugins/role-based-tax-exclusion/role-based-tax-exclusion.php:45
    Stack trace:
    #0 wp-admin/includes/plugin.php(2318): include_once()
    #1 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

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

This is a short check of server-side resources used by Role Based Tax Exclusion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.50 ▼2.35
Dashboard /wp-admin3.31 ▼0.0444.20 ▼17.34
Posts /wp-admin/edit.php3.36 ▲0.0045.14 ▲0.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.22 ▼3.52
Media Library /wp-admin/upload.php3.23 ▲0.0034.33 ▲1.16

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Role Based Tax Exclusion
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.34 ▲0.021.67 ▼0.1041.47 ▼3.72
Dashboard /wp-admin2,192 ▲145.53 ▼0.1785.71 ▼28.5239.98 ▼5.00
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0140.73 ▲5.9235.93 ▲0.57
Add New Post /wp-admin/post-new.php1,535 ▲925.31 ▲1.71622.58 ▲30.6172.26 ▲21.21
Media Library /wp-admin/upload.php1,397 ▼64.20 ▲0.0393.93 ▼5.9942.27 ▼1.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Settings page for plugin under WooCommerce taxes) image missing
You can look at the official readme.txt

role-based-tax-exclusion/role-based-tax-exclusion.php Passed 13 tests

The main PHP script in "Role Based Tax Exclusion" version 1.0.8 is automatically included on every request by WordPress
122 characters long description:
With this plugin administrator can define which user roles see prices in store and cart pages of WooCommerce without taxes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin102 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1144058
PO File191244

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin