78% filter-everything

Code Review | Filter Everything — WooCoomerce Product & WordPress Filter

WordPress plugin Filter Everything — WooCoomerce Product & WordPress Filter scored 78% from 54 tests.

About plugin

  • Plugin page: filter-everything
  • Plugin version: 1.4.5
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.2
  • WordPress version: 5.8.1
  • First release: Jun 22, 2021
  • Latest release: Nov 15, 2021
  • Number of updates: 23
  • Update frequency: every 8.7 days
  • Top authors: Stepasyuk (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active / 8,542 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲2.38MB] [CPU: ▼126.08ms] Passed 4 tests

A check of server-side resources used by Filter Everything — WooCoomerce Product & WordPress Filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.17 ▲2.3347.70 ▲14.98
Dashboard /wp-admin5.47 ▲2.4167.20 ▲27.78
Posts /wp-admin/edit.php5.51 ▲2.4064.19 ▲15.23
Add New Post /wp-admin/post-new.php7.82 ▲2.38112.89 ▼554.66
Media Library /wp-admin/upload.php5.41 ▲2.4155.35 ▲20.13
Add New /wp-admin/post-new.php?post_type=filter-set5.5176.68
Filter Sets /wp-admin/edit.php?post_type=filter-set5.4563.74
Settings /wp-admin/edit.php?post_type=filter-set&page=filters-settings5.3948.42

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 98 new files
Database: no new tables, 5 new options
New WordPress options
widget_wpc_chips_widget
wpc_filter_settings
wpc_filter_experimental
widget_wpc_sorting_widget
widget_wpc_filters_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Filter Everything — WooCoomerce Product & WordPress Filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,974 ▲40217.10 ▲1.2714.89 ▲6.0148.14 ▼6.24
Dashboard /wp-admin3,066 ▲1356.56 ▲0.61154.30 ▼5.21127.21 ▲12.82
Posts /wp-admin/edit.php2,845 ▲1092.83 ▲0.1380.85 ▲12.61114.28 ▲16.65
Add New Post /wp-admin/post-new.php1,755 ▲7218.97 ▲0.21368.02 ▼18.68116.43 ▼5.25
Media Library /wp-admin/upload.php1,914 ▲1075.46 ▲0.45134.19 ▼35.94127.42 ▼3.77
Add New /wp-admin/post-new.php?post_type=filter-set2,4383.83105.37114.09
Filter Sets /wp-admin/edit.php?post_type=filter-set1,6463.1069.96104.13
Settings /wp-admin/edit.php?post_type=filter-set&page=filters-settings1,6773.1585.3187.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 3 options in the database
    • widget_wpc_filters_widget
    • widget_wpc_chips_widget
    • widget_wpc_sorting_widget

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)
Everything seems fine, however 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
Almost there! Just fix the following items
  • 65× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FilterEverything\\Filter\\wp_die() in wp-content/plugins/filter-everything/src/Entities/AuthorEntity.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FilterEverything\\Filter\\wp_die() in wp-content/plugins/filter-everything/src/Entities/PostMetaNumEntity.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FilterEverything\\Filter\\wp_die() in wp-content/plugins/filter-everything/src/Admin/Widgets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/filter-everything/filter-everything.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/filter-everything/views/admin/filter-field-input.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FilterEverything\\Filter\\wp_die() in wp-content/plugins/filter-everything/src/FormFields/Input.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/filter-everything/views/admin/filter-row.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FilterEverything\\Filter\\wp_die() in wp-content/plugins/filter-everything/src/Admin/Admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FilterEverything\\Filter\\wp_die() in wp-content/plugins/filter-everything/src/WpManager.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FilterEverything\\Filter\\wp_die() in wp-content/plugins/filter-everything/src/Sorting.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=filter-set
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8.1 1:31592 "jQuery.Deferred exception: e(...).select2 is not a function" "TypeError: e(...).select2 is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/filter-everything/assets/js/wpc-filters-common-admin.min.js?ver=1.4.5:1:1287)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/edit.php?post_type=filter-set
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8.1 1:31702 Uncaught TypeError: e(...).select2 is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

filter-everything/filter-everything.php 92% from 13 tests

This is the main PHP file of "Filter Everything — WooCoomerce Product & WordPress Filter" version 1.4.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected27,834 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript183,01394711,955
PHP672,9361,02111,568
CSS860213,061
PO File14542881,250

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity32.66
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces1
Interfaces2
Traits0
Classes48
▷ Abstract classes12.08%
▷ Concrete classes4797.92%
▷ Final classes00.00%
Methods494
▷ Static methods132.63%
▷ Public methods40581.98%
▷ Protected methods40.81%
▷ Private methods8517.21%
Functions120
▷ Named functions11595.83%
▷ Anonymous functions54.17%
Constants23
▷ Global constants1878.26%
▷ Class constants521.74%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin