73% tax-exemption-woo

Code Review | Tax Exemption for WooCommerce

WordPress plugin Tax Exemption for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: tax-exemption-woo
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2023
  • Latest release: Dec 1, 2023
  • Number of updates: 21
  • Update frequency: every 2.5 days
  • Top authors: Elliotvs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /330 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.43MB] [CPU: ▲24.29ms] 50% from 4 tests

An overview of server-side resources used by Tax Exemption for WooCommerce
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,004.81ms on /wp-admin/admin.php?page=tax-exemption-woo)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.43MB on /wp-admin/admin.php?page=tax-exemption-woo)
PageMemory (MB)CPU Time (ms)
Home /9.26 ▲5.7968.89 ▲26.10
Dashboard /wp-admin9.28 ▲5.9779.70 ▲27.04
Posts /wp-admin/edit.php9.29 ▲5.9280.54 ▲32.89
Add New Post /wp-admin/post-new.php9.94 ▲4.04111.56 ▲13.29
Media Library /wp-admin/upload.php9.28 ▲6.0565.28 ▲30.72
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2867.18
Tax Exemption /wp-admin/admin.php?page=tax-exemption-woo9.281,004.81

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 190 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
fs_debug_mode
widget_theysaidso_widget
fs_accounts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
fs_active_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tax Exemption for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4514.70 ▲0.361.55 ▼0.1129.85 ▼13.71
Dashboard /wp-admin2,212 ▲325.53 ▼0.0798.49 ▲7.6745.45 ▲0.72
Posts /wp-admin/edit.php2,121 ▲242.02 ▲0.0442.06 ▲2.6037.81 ▲3.77
Add New Post /wp-admin/post-new.php1,531 ▲522.98 ▼0.16620.08 ▼59.3853.17 ▲3.26
Media Library /wp-admin/upload.php1,417 ▲144.23 ▼0.0296.38 ▼1.6846.48 ▲3.43
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0821.6526.6231.12
Tax Exemption /wp-admin/admin.php?page=tax-exemption-woo9841.8930.1958.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/tax-exemption-woo/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_accounts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=tax-exemption-woo
    • > Network (severe)
    wp-content/themes/twentytwentyone/js/custom-select2-init.js - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: woocommerce, tax, tax exemption, vat, vat exemption

tax-exemption-woo/tax-exemption-woo.php 92% from 13 tests

The primary PHP file in "Tax Exemption for WooCommerce" version 1.2.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "3.7")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin36,346 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
PHP1248,37917,50835,594
JavaScript775111521
CSS15192231

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity87.19
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,277
▷ Static methods19915.58%
▷ Public methods87768.68%
▷ Protected methods171.33%
▷ Private methods38329.99%
Functions140
▷ Named functions13697.14%
▷ Anonymous functions42.86%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/tax-exemption-woo.png3.12KB2.85KB▼ 8.43%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%