78% eazyfilter-for-woocommerce

Code Review | EazyFilter - The Easiest Produt Filter Plugin for WooCommerce (WooCommerce Ajax Product Filter)

WordPress plugin EazyFilter - The Easiest Produt Filter Plugin for WooCommerce (WooCommerce Ajax Product Filter) scored 78% from 54 tests.

About plugin

  • Plugin page: eazyfilter-for-wo...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2022
  • Latest release: Mar 29, 2022
  • Number of updates: 26
  • Update frequency: every 3.2 days
  • Top authors: eazyplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,728 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: ▲0.08MB] [CPU: ▼0.40ms] Passed 4 tests

Analyzing server-side resources used by EazyFilter - The Easiest Produt Filter Plugin for WooCommerce (WooCommerce Ajax Product Filter)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.01 ▼3.59
Dashboard /wp-admin3.38 ▲0.0748.98 ▲2.45
Posts /wp-admin/edit.php3.49 ▲0.1345.79 ▲0.09
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.22 ▼0.54
Media Library /wp-admin/upload.php3.30 ▲0.0736.54 ▲2.51

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 102 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
eazyfilter_do_activation_redirect
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
eazyfilter_activation_info
theysaidso_admin_options
eazyfilter_do_setup_redirect
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for EazyFilter - The Easiest Produt Filter Plugin for WooCommerce (WooCommerce Ajax Product Filter)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.31 ▼0.981.76 ▼0.0438.31 ▼12.96
Dashboard /wp-admin2,228 ▲435.91 ▲0.06102.83 ▲1.7740.14 ▼1.80
Posts /wp-admin/edit.php2,107 ▲152.01 ▼0.0037.67 ▼5.2533.17 ▼4.94
Add New Post /wp-admin/post-new.php1,547 ▲2823.10 ▼0.02590.57 ▼40.2249.87 ▼15.73
Media Library /wp-admin/upload.php1,407 ▲224.22 ▲0.0298.85 ▼8.2344.40 ▼1.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • eazyfilter_do_setup_redirect
    • widget_recent-posts
    • widget_recent-comments
    • eazyfilter_activation_info
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • eazyfilter_do_activation_redirect

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/text-choose.php
    • > /wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/checkbox.php
    • > /wp-content/plugins/eazyfilter-for-woocommerce/libs/index.php
    • > /wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/button-choose.php
    • > /wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/color-swatches.php
  • 38× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eazyfilter-for-woocommerce/libs/global-functions.php:84
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/text-choose.php on line 28
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/checkbox.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/color-swatches.php on line 7
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/text-choose.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'EazyFilter\\Libs\\Filter_Manager' not found in wp-content/plugins/eazyfilter-for-woocommerce/templates/setup/setup-welcome.php:2
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/color-swatches.php on line 32
    • > PHP Fatal error
      Uncaught Error: Class 'EazyFilter\\App\\Filters\\Action' not found in wp-content/plugins/eazyfilter-for-woocommerce/templates/modal/modal-filter-group.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/select.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/eazyfilter-for-woocommerce/templates/filters/text-choose.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: product filter, woocommerce filters, ajax filter, woocommerce filter, elementor

eazyfilter-for-woocommerce/eazyfilter-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "EazyFilter - The Easiest Produt Filter Plugin for WooCommerce (WooCommerce Ajax Product Filter)" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin7,946 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP531,3543537,484
CSS18410249
SVG200132
JavaScript101281

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.86
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces8
Interfaces0
Traits1
Classes35
▷ Abstract classes25.71%
▷ Concrete classes3394.29%
▷ Final classes13.03%
Methods190
▷ Static methods73.68%
▷ Public methods15481.05%
▷ Protected methods3417.89%
▷ Private methods21.05%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo-20x20.png0.40KB0.35KB▼ 10.84%
assets/img/logo.png4.01KB1.87KB▼ 53.45%