10% washington-state-sales-tax-for-shopp

Code Review | Washington State Sales Tax for Shopp

WordPress plugin Washington State Sales Tax for Shopp scored10%from 54 tests.

About plugin

  • Plugin page: washington-state-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4+
  • WordPress version: 6.3.1
  • First release: Aug 21, 2012
  • Latest release: Jul 8, 2013
  • Number of updates: 13
  • Update frequency: every 24.7 days
  • Top authors: sewmyheadon (84.62%)ivycat (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,197 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php+43
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.01ms] Passed 4 tests

Analyzing server-side resources used by Washington State Sales Tax for Shopp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.49 ▼37.29
Dashboard /wp-admin2.11 ▼1.196.05 ▼44.15
Posts /wp-admin/edit.php2.11 ▼1.256.14 ▼45.15
Add New Post /wp-admin/post-new.php2.11 ▼3.788.29 ▼89.45
Media Library /wp-admin/upload.php2.11 ▼1.125.72 ▼32.94
WA State Tax /wp-admin/admin.php?page=washington-taxes2.116.78

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Washington State Sales Tax for Shopp: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.174.27 ▲2.4840.68 ▼4.06
Dashboard /wp-admin2,206 ▲184.90 ▼0.92105.05 ▼8.1042.15 ▼0.42
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0136.50 ▼1.1034.78 ▼3.97
Add New Post /wp-admin/post-new.php1,528 ▼018.32 ▲0.12664.29 ▲29.4753.14 ▼4.29
Media Library /wp-admin/upload.php1,382 ▼64.20 ▲0.0094.67 ▼10.8242.79 ▼1.06
WA State Tax /wp-admin/admin.php?page=washington-taxes8481.6823.4724.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php+43
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=washington-taxes
    • > Notice in wp-content/plugins/washington-state-sales-tax-for-shopp/assets/views/option-page-view.php+54
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=washington-taxes
    • > Notice in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php+187
    Undefined variable: tail
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=washington-taxes
    • > Warning in wp-admin/includes/plugin.php+1933
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=washington-taxes
    • > Notice in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php+192
    Undefined variable: newtail
    • > GET request to /wp-admin/admin.php?page=washington-taxes
    • > Notice in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php+194
    Undefined variable: head
    • > GET request to /wp-admin/admin.php?page=washington-taxes
    • > Warning in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php+194
    array_merge(): Expected parameter 2 to be an array, null given
    • > GET request to /wp-admin/admin.php?page=washington-taxes
    • > Warning in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php+194
    array_merge(): Expected parameter 1 to be an array, null given

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/washington-state-sales-tax-for-shopp/assets/views/option-page-view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tested up to: Version not formatted correctly
Please take inspiration from this readme.txt

washington-state-sales-tax-for-shopp/washington-state-sales-tax-for-shopp.php Passed 13 tests

The principal PHP file in "Washington State Sales Tax for Shopp" v. 1.1.0 is loaded by WordPress automatically on each request
117 characters long description:
Connect Shopp with Washington State's Department of Revenue API for on-the-fly sales tax rate lookup and calculation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected316 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23938258
JavaScript23258

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.38
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods214.29%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin