83% additional-tax-options-for-woocommerce

Code Review | Additional Tax Options for WooCommerce

WordPress plugin Additional Tax Options for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: additional-tax-op...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2020
  • Latest release: Nov 23, 2020
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: wpnomad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,395 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
Installer ran successfully

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

Server-side resources used by Additional Tax Options for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.15 ▼7.23
Dashboard /wp-admin3.31 ▲0.0144.48 ▼5.05
Posts /wp-admin/edit.php3.36 ▲0.0149.01 ▲2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.73 ▼10.87
Media Library /wp-admin/upload.php3.24 ▲0.0136.22 ▼0.12

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Additional Tax Options for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.091.64 ▼0.4440.25 ▼3.65
Dashboard /wp-admin2,206 ▲154.88 ▲0.01105.93 ▼14.1939.31 ▼6.22
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0540.92 ▲2.8536.01 ▲0.52
Add New Post /wp-admin/post-new.php1,533 ▼023.04 ▼0.01629.00 ▼42.7757.30 ▲7.17
Media Library /wp-admin/upload.php1,388 ▼04.31 ▲0.10100.32 ▼17.8242.43 ▼4.96

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/additional-tax-options-for-woocommerce/includes/additional-tax-settings-fields.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (These options are located in WooCommerce → Settings → Tax)
  • Donate link: Invalid url: ""
  • Stable tag: Empty value
You can take inspiration from this readme.txt

additional-tax-options-for-woocommerce/woo-additional-tax-options.php 77% from 13 tests

"Additional Tax Options for WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 263 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("additional-tax-options-for-woocommerce.php" instead of "woo-additional-tax-options.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin45 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2122045

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
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 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%
Functions1
▷ Named functions1100.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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
settings-screenshot.png.png22.88KB22.81KB0.29%