99% product-filter-addon-for-woocommerce

Code Review | Product Filter Addon for-Woocommerce

WordPress plugin Product Filter Addon for-Woocommerce scored 99% from 54 tests.

About plugin

  • Plugin page: product-filter-ad...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.2.1
  • WordPress version: 5.8.1
  • First release: Nov 25, 2019
  • Latest release: Nov 25, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: saiful.total (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 261 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼147.55ms] Passed 4 tests

Server-side resources used by Product Filter Addon for-Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1938.83 ▲18.47
Dashboard /wp-admin3.13 ▲0.0737.81 ▼8.06
Posts /wp-admin/edit.php3.18 ▲0.0739.27 ▼9.44
Add New Post /wp-admin/post-new.php5.48 ▲0.0590.82 ▼573.40
Media Library /wp-admin/upload.php3.07 ▲0.0733.70 ▲0.72

Server storage [IO: ▲0.09MB] [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: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Product Filter Addon for-Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,793 ▲19716.31 ▲0.7116.16 ▲7.3355.34 ▲7.06
Dashboard /wp-admin2,970 ▲365.98 ▲0.03141.42 ▼25.56109.89 ▲3.57
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0167.68 ▼1.0291.97 ▲6.35
Add New Post /wp-admin/post-new.php1,498 ▼18518.80 ▲0.34407.01 ▲20.93114.21 ▲4.17
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.01149.14 ▼12.23109.20 ▼7.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce, woocommerce product filter, wordpress product filter with woo-commerce, woocommerce product sorting

product-filter-addon-for-woocommerce/nss-addon-woocommerce-product-filter.php 77% from 13 tests

Analyzing the main PHP file in "Product Filter Addon for-Woocommerce" version 1.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("product-filter-addon-for-woocommerce.php" instead of "nss-addon-woocommerce-product-filter.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,318 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP94481788
JavaScript1616210
CSS11327198
PO File24458122

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1083.33%
▷ Protected methods216.67%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
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
PNG images were not found in this plugin