84% rnd-wc-product-filters-with-ajax

Code Review | RND Product Filters with ajax for WooCommerce

WordPress plugin RND Product Filters with ajax for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: rnd-wc-product-fi...
  • Plugin version: 1.1
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 13, 2022
  • Latest release: Jul 13, 2022
  • Number of updates: 9
  • Update frequency: every 15.7 days
  • Top authors: webrndexperts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.23ms] Passed 4 tests

An overview of server-side resources used by RND Product Filters with ajax for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1341.48 ▲1.92
Dashboard /wp-admin3.44 ▲0.1451.31 ▲0.75
Posts /wp-admin/edit.php3.56 ▲0.2051.40 ▼0.74
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.17 ▼10.40
Media Library /wp-admin/upload.php3.37 ▲0.1340.05 ▲1.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for RND Product Filters with ajax for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.14 ▲0.051.93 ▲0.0842.95 ▼2.53
Dashboard /wp-admin2,198 ▲235.48 ▼0.0886.92 ▼14.9239.73 ▼2.61
Posts /wp-admin/edit.php2,103 ▲32.09 ▲0.1237.05 ▼0.6334.48 ▼3.67
Add New Post /wp-admin/post-new.php1,529 ▼623.26 ▲5.15644.20 ▲10.8258.89 ▼12.21
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0598.34 ▼10.7141.23 ▼7.83

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rnd-wc-product-filters-with-ajax/ajax/filters.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/rnd-wc-product-filters-with-ajax/rnd-ajax-product-filters.php:38
    • > PHP Warning
      sizeof(): Parameter must be an array or an object that implements Countable in wp-content/plugins/rnd-wc-product-filters-with-ajax/ajax/templates/active-filter.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rnd-wc-product-filters-with-ajax/ajax/widgets/widget-category-filter.php:6
    • > PHP Notice
      Undefined variable: active_filters in wp-content/plugins/rnd-wc-product-filters-with-ajax/ajax/templates/active-filter.php on line 5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: woocommerce ajax product search, woocommerce ajax product reviews, woocommerce ajax pagination, wordpress plugin, woocommerce ajax advance search...

rnd-wc-product-filters-with-ajax/rnd-ajax-product-filters.php 85% from 13 tests

The principal PHP file in "RND Product Filters with ajax for WooCommerce" v. 1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rnd-wc-product-filters-with-ajax.php" instead of "rnd-ajax-product-filters.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected3,975 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP84344381,633
JavaScript518982874
SVG100640
CSS45310544
PO File2116156284

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity60.67
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods47
▷ Static methods714.89%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ajax/assets/css/select2.png0.60KB0.99KB0.00%
ajax/assets/css/select2x2.png0.83KB0.77KB▼ 6.15%