83% sales-tax-reports-for-woocommerce

Code Review | Sales Tax Reports For WooCommerce

WordPress plugin Sales Tax Reports For WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: sales-tax-reports...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 19, 2021
  • Latest release: Mar 15, 2023
  • Number of updates: 14
  • Update frequency: every 47.9 days
  • Top authors: mystyleplatform (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

700+ active / 3,856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.90ms] Passed 4 tests

Analyzing server-side resources used by Sales Tax Reports For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.23 ▲2.66
Dashboard /wp-admin3.36 ▲0.0550.39 ▲2.95
Posts /wp-admin/edit.php3.47 ▲0.1248.80 ▲2.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.86 ▼4.45
Media Library /wp-admin/upload.php3.28 ▲0.0538.51 ▲4.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
wc_state_tax_report_options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Sales Tax Reports For WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.34 ▼1.024.22 ▲2.5439.66 ▼2.72
Dashboard /wp-admin2,220 ▲325.01 ▲0.13113.52 ▲7.9242.07 ▲0.88
Posts /wp-admin/edit.php2,106 ▲202.23 ▲0.2139.58 ▲4.3034.14 ▼2.09
Add New Post /wp-admin/post-new.php1,526 ▼1617.73 ▼0.77623.97 ▲14.1752.96 ▼18.62
Media Library /wp-admin/upload.php1,402 ▲114.34 ▲0.1695.95 ▼6.6242.42 ▼5.82

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • wc_state_tax_report_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/sales-tax-reports-for-woocommerce/templates/tax_table.php:38
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sales-tax-reports-for-woocommerce/templates/tax_table.php on line 15
    • > PHP Notice
      Undefined variable: rows in wp-content/plugins/sales-tax-reports-for-woocommerce/templates/tax_table.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: The official readme.txt might help

sales-tax-reports-for-woocommerce/wc_state_tax_report.php 85% from 13 tests

The main file in "Sales Tax Reports For WooCommerce" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sales-tax-reports-for-woocommerce.php" instead of "wc_state_tax_report.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "2.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin384 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP386135333
JavaScript1302351

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity7.00
▷ Maximum class complexity21.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods17
▷ Static methods211.76%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.42MB with 0.37MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/banner-772x250.png98.39KB0.00KB▼ 100.00%
assets/screenshot-1.png333.84KB87.53KB▼ 73.78%