84% woo-shipping-class-filter

Code Review | Woo Shipping Class Filter

WordPress plugin Woo Shipping Class Filter scored84%from 54 tests.

About plugin

  • Plugin page: woo-shipping-clas...
  • Plugin version: 2.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 15, 2018
  • Latest release: Nov 22, 2022
  • Number of updates: 6
  • Update frequency: every 255.3 days
  • Top authors: kinging (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /769 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.99ms] Passed 4 tests

A check of server-side resources used by Woo Shipping Class Filter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.84 ▼2.49
Dashboard /wp-admin3.32 ▼0.0350.02 ▼9.47
Posts /wp-admin/edit.php3.37 ▲0.0148.14 ▲0.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.51 ▼16.07
Media Library /wp-admin/upload.php3.24 ▲0.0136.02 ▲2.83

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

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

Browser metrics Passed 4 tests

Woo Shipping Class Filter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4614.34 ▼0.031.57 ▼0.1542.03 ▼2.84
Dashboard /wp-admin2,201 ▲275.63 ▲0.0189.70 ▼15.9439.20 ▼3.71
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.0139.66 ▲4.9938.84 ▲4.47
Add New Post /wp-admin/post-new.php1,537 ▲218.47 ▲0.37631.48 ▲16.8869.76 ▲11.48
Media Library /wp-admin/upload.php1,403 ▼04.14 ▼0.0996.71 ▼0.7641.58 ▼0.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-shipping-class-filter/orders.php:180
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-shipping-class-filter/woo-shipping-class-filter.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

woo-shipping-class-filter/woo-shipping-class-filter.php Passed 13 tests

This is the main PHP file of "Woo Shipping Class Filter" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
93 characters long description:
A WooCommerce Extension that enabled filtering products by Shipping class in the admin panel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected205 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP264101205

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin