67% avalon23-products-filter-for-woocommerce

Code Review | Avalon23 Products Filter for WooCommerce

WordPress plugin Avalon23 Products Filter for WooCommerce scored67%from 54 tests.

About plugin

  • Plugin page: avalon23-products...
  • Plugin version: 1.1.4.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2021
  • Latest release: Sep 13, 2023
  • Number of updates: 27
  • Update frequency: every 34.8 days
  • Top authors: paradigmatools (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

30+ active /1,782 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.71MB] [CPU: ▲1.30ms] Passed 4 tests

Server-side resources used by Avalon23 Products Filter for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.11 ▲1.6543.98 ▼0.19
Dashboard /wp-admin5.04 ▲1.7359.42 ▲4.76
Posts /wp-admin/edit.php5.09 ▲1.7358.52 ▲4.87
Add New Post /wp-admin/post-new.php7.64 ▲1.7596.17 ▼4.23
Media Library /wp-admin/upload.php4.96 ▲1.7357.29 ▲19.26

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 113 new files
Database: 4 new tables, 7 new options
New tables
wp_avalon23_filters_fields
wp_avalon23_filters
wp_avalon23_vocabulary
wp_avalon23_filters_meta
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
avalon23_db_ver
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Avalon23 Products Filter for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,460 ▼30114.16 ▲0.150.52 ▼1.2918.78 ▼26.20
Dashboard /wp-admin2,201 ▲215.63 ▲0.0487.01 ▼2.0641.09 ▼4.27
Posts /wp-admin/edit.php2,106 ▲61.96 ▼0.0736.01 ▼4.5530.35 ▼5.74
Add New Post /wp-admin/post-new.php1,532 ▲623.64 ▼0.05708.46 ▼9.6966.26 ▼3.45
Media Library /wp-admin/upload.php1,406 ▲94.25 ▲0.1399.99 ▼7.8443.90 ▼3.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_avalon23_filters_fields
    • wp_avalon23_filters
    • wp_avalon23_vocabulary
    • wp_avalon23_filters_meta
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • avalon23_db_ver
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_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)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/avalon23-products-filter-for-woocommerce/classes/storage.php
    • > /wp-content/plugins/avalon23-products-filter-for-woocommerce/views/popup.php
    • > /wp-content/plugins/avalon23-products-filter-for-woocommerce/classes/admin/admin.php
    • > /wp-content/plugins/avalon23-products-filter-for-woocommerce/views/options.php
    • > /wp-content/plugins/avalon23-products-filter-for-woocommerce/views/filter.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/avalon23-products-filter-for-woocommerce/views/table.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

avalon23-products-filter-for-woocommerce/avalon23-products-filter.php 77% from 13 tests

The main PHP file in "Avalon23 Products Filter for WooCommerce" ver. 1.1.4.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "WP 4.9")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("avalon23-products-filter-for-woocommerce.php" instead of "avalon23-products-filter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin20,658 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,7782919,264
JavaScript321,5843476,270
CSS304482185,124

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity45.23
▷ Minimum class complexity3.00
▷ Maximum class complexity305.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes26.67%
Methods342
▷ Static methods3911.40%
▷ Public methods32494.74%
▷ Protected methods00.00%
▷ Private methods185.26%
Functions100
▷ Named functions11.00%
▷ Anonymous functions9999.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.41MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/filter_down.png3.26KB1.62KB▼ 50.37%
assets/img/side_filter.png5.28KB2.63KB▼ 50.25%
ext/image_map/img/marker.png1.60KB0.60KB▼ 62.72%
assets/img/logo_avolon23.png400.74KB168.97KB▼ 57.84%
assets/img/filter_up.png3.92KB1.97KB▼ 49.80%