77% extend-filter-products-by-price-widget

Code Review | Extend Filter Products By Price Widget

WordPress plugin Extend Filter Products By Price Widget scored 77% from 54 tests.

About plugin

  • Plugin page: extend-filter-pro...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4
  • WordPress version: 5.9.2
  • First release: May 2, 2020
  • Latest release: May 2, 2020
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: kartechify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 333 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲4.56MB] [CPU: ▼292.72ms] 75% from 4 tests

An overview of server-side resources used by Extend Filter Products By Price Widget
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,809.12ms on /wp-admin/admin.php?page=extend-filter-products-by-price-widget)
PageMemory (MB)CPU Time (ms)
Home /8.43 ▲4.9274.94 ▲27.73
Dashboard /wp-admin8.45 ▲5.0453.79 ▲19.48
Posts /wp-admin/edit.php8.45 ▲4.8160.35 ▲23.62
Add New Post /wp-admin/post-new.php10.44 ▲3.47114.25 ▼1,235.80
Media Library /wp-admin/upload.php8.45 ▲5.1546.10 ▲21.82
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius8.4545.59
Extend Filter Products By Price Widget /wp-admin/admin.php?page=extend-filter-products-by-price-widget8.451,809.12

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 197 new files
Database: no new tables, 4 new options
New WordPress options
fs_debug_mode
fs_gdpr
fs_active_plugins
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for Extend Filter Products By Price Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,960 ▲21816.35 ▲0.718.89 ▲2.992.51 ▲0.18
Dashboard /wp-admin2,945 ▲876.17 ▲0.02120.37 ▼16.88171.57 ▲13.04
Posts /wp-admin/edit.php2,743 ▲523.24 ▼0.0067.08 ▲5.10170.26 ▲28.36
Add New Post /wp-admin/post-new.php1,649 ▼1216.67 ▲0.57501.03 ▲76.67149.88 ▼0.82
Media Library /wp-admin/upload.php1,750 ▲525.53 ▲0.03146.21 ▲2.61213.33 ▲30.35
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4332.5457.32119.54
Extend Filter Products By Price Widget /wp-admin/admin.php?page=extend-filter-products-by-price-widget1,2912.5854.20171.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 4 options
    • fs_debug_mode
    • fs_active_plugins
    • fs_gdpr
    • fs_accounts

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 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
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/extend-filter-products-by-price-widget/public/partials/wc-change-filter-by-price-display-public-display.php
    • > /wp-content/plugins/extend-filter-products-by-price-widget/admin/partials/wc-change-filter-by-price-display-admin-display.php
    • > /wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/ajax-loader.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/extend-filter-products-by-price-widget/freemius/templates/account/partials/addon.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: slider, widget, sorting, filter, woocommerce

extend-filter-products-by-price-widget/wc-change-filter-by-price-display.php 69% from 13 tests

The main PHP script in "Extend Filter Products By Price Widget" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 269 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("extend-filter-products-by-price-widget.php" instead of "wc-change-filter-by-price-display.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin45,663 lines of code in 151 files:
LanguageFilesBlank linesComment linesLines of code
PHP1187,23416,50829,969
PO File136,9648,46215,261
JavaScript538113200
Markdown1610192
JSON10027
CSS130814

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity75.69
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,157
▷ Static methods17615.21%
▷ Public methods81170.10%
▷ Protected methods151.30%
▷ Private methods33128.61%
Functions97
▷ Named functions97100.00%
▷ Anonymous functions00.00%
Constants123
▷ Global constants9879.67%
▷ Class constants2520.33%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/extend-filter-products-by-price-widget.png2.22KB1.06KB▼ 52.46%