77% tax-report-for-woocommerce

Code Review | Tax Report for WooCommerce

WordPress plugin Tax Report for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: tax-report-for-wo...
  • Plugin version: 2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.x-6.1.0
  • WordPress version: 6.3.1
  • First release: Feb 20, 2017
  • Latest release: Feb 20, 2023
  • Number of updates: 32
  • Update frequency: every 68.4 days
  • Top authors: infosoftplugin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.56ms] Passed 4 tests

This is a short check of server-side resources used by Tax Report for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.55 ▼1.52
Dashboard /wp-admin3.38 ▲0.0345.42 ▼17.41
Posts /wp-admin/edit.php3.49 ▲0.1345.24 ▲0.26
Add New Post /wp-admin/post-new.php5.96 ▲0.0778.90 ▼19.58
Media Library /wp-admin/upload.php3.30 ▲0.0733.07 ▲1.64
Other Plug-ins /wp-admin/admin.php?page=ic-tax-addons3.2931.44
Tax Report /wp-admin/admin.php?page=ic-tax-report3.3031.99
Dashboard /wp-admin/admin.php?page=tax-menu3.3131.44

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
recovery_mode_email_last_sent
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Tax Report for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.35 ▼0.211.57 ▼0.2240.55 ▼3.19
Dashboard /wp-admin2,216 ▲425.51 ▼0.0391.25 ▼12.6037.09 ▼6.40
Posts /wp-admin/edit.php2,127 ▲271.99 ▼0.0139.25 ▲4.8135.63 ▲0.40
Add New Post /wp-admin/post-new.php1,551 ▲2523.27 ▼0.45649.88 ▲17.9263.37 ▲15.10
Media Library /wp-admin/upload.php1,424 ▲244.21 ▲0.0297.60 ▼0.2944.14 ▲0.83
Other Plug-ins /wp-admin/admin.php?page=ic-tax-addons1,1521.7727.0439.32
Tax Report /wp-admin/admin.php?page=ic-tax-report9381.9431.3230.65
Dashboard /wp-admin/admin.php?page=tax-menu7661.358.2433.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=tax-menu
    • > Error in wp-content/plugins/tax-report-for-woocommerce/include/ic-woocommerce-tax-report-dashboard.php+121
    Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/tax-report-for-woocommerce/include/ic-woocommerce-tax-report-dashboard.php:121
    Stack trace:
    #0 wp-content/plugins/tax-report-for-woocommerce/include/ic-woocommerce-tax-report-dashboard.php(24): IC_WooCommerce_Tax_Report_Dashboard->get_tax_summary()
    #1 wp-content/plugins/tax-report-for-woocommerce/include/ic-woocommerce-tax-report-dashboard.php(19): IC_WooCommerce_Tax_Report_Dashboard->get_grid()
    #2 wp-content/plugins/tax-report-for-woocommerce/include/ic-woocommerce-tax-report-init.php(78): IC_WooCommerce_Tax_Report_Dashboard->page_init()
    #3 wp-includes/class-wp-hook.php(310): IC_WooCommerce_Tax_Report_Init->add_page()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=tax-menu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).datepicker is not a function" "TypeError: jQuery(...).datepicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/tax-report-for-woocommerce/js/ic-woocommerce-tax-report-list.js?ver=6.3.1:8:31)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=tax-menu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).datepicker is not a function

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (WooTax Dashbaord.), #2 (Recent Order List.), #3 (Tax Detail Report.)
Please take inspiration from this readme.txt

tax-report-for-woocommerce/ic-woocommerce-tax-report.php 77% from 13 tests

The principal PHP file in "Tax Report for WooCommerce" v. 2.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("tax-report-for-woocommerce.php" instead of "ic-woocommerce-tax-report.php")
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "3.5.x")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected1,166 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP714167784
CSS211612353
JavaScript271029

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.00
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/assets/images/tickmark.png0.33KB0.35KB0.00%
screenshot-2.png37.00KB25.69KB▼ 30.56%
screenshot-3.png35.02KB22.87KB▼ 34.70%
screenshot-1.png25.79KB13.66KB▼ 47.03%