84% taxjar-simplified-taxes-for-woocommerce

Code Review | TaxJar - Sales Tax Automation for WooCommerce

WordPress plugin TaxJar - Sales Tax Automation for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: taxjar-simplified...
  • Plugin version: 4.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2014
  • Latest release: Oct 10, 2023
  • Number of updates: 197
  • Update frequency: every 17.8 days
  • Top authors: taxjar (63.96%)tonkapark (28.93%)seanvoss (6.6%)ntbnnt (2.03%)

Code review

54 tests

User reviews

24 reviews

Install metrics

10,000+ active /350,202 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.42ms] Passed 4 tests

Analyzing server-side resources used by TaxJar - Sales Tax Automation for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0447.65 ▲5.68
Dashboard /wp-admin3.35 ▲0.0047.09 ▼14.58
Posts /wp-admin/edit.php3.40 ▲0.0444.72 ▲0.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.32 ▼22.61
Media Library /wp-admin/upload.php3.27 ▲0.0434.00 ▼1.36

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for TaxJar - Sales Tax Automation for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.33 ▼0.011.70 ▼0.0145.92 ▲3.11
Dashboard /wp-admin2,203 ▲285.51 ▼0.0994.65 ▼17.7843.06 ▼2.94
Posts /wp-admin/edit.php2,109 ▲92.00 ▼0.0133.81 ▼5.0734.49 ▼1.26
Add New Post /wp-admin/post-new.php1,536 ▼622.97 ▲4.80640.89 ▲35.3249.61 ▼14.82
Media Library /wp-admin/upload.php1,411 ▲114.19 ▼0.0897.82 ▲2.8541.73 ▼0.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'TaxJar\\Module' not found in wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/compatibility/modules/class-woocommerce-smart-coupons.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_API' not found in wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-wc-taxjar-integration.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'TaxJar\\Module' not found in wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/compatibility/modules/class-woocommerce-gift-cards.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'TaxJar\\Module' not found in wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/compatibility/modules/class-woocommerce-pdf-product-vouchers.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: tax, sales tax, sales tax filing, tax calculation, taxjar...

taxjar-simplified-taxes-for-woocommerce/taxjar-woocommerce.php 85% from 13 tests

The primary PHP file in "TaxJar - Sales Tax Automation for WooCommerce" version 4.2.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.4" instead of "6.4.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("taxjar-simplified-taxes-for-woocommerce.php" instead of "taxjar-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected7,153 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP601,5623,5556,270
Markdown1850329
CSS1320222
JavaScript2237168
XML1257135
JSON10029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.86
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces2
Interfaces5
Traits0
Classes53
▷ Abstract classes611.32%
▷ Concrete classes4788.68%
▷ Final classes12.13%
Methods606
▷ Static methods10917.99%
▷ Public methods43271.29%
▷ Protected methods579.41%
▷ Private methods11719.31%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected