78% color-filters

Code Review | Ultimate WooCommerce Filters

WordPress plugin Ultimate WooCommerce Filters scored78%from 54 tests.

About plugin

  • Plugin page: color-filters
  • Plugin version: 3.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 7.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 23, 2015
  • Latest release: Nov 7, 2023
  • Number of updates: 95
  • Update frequency: every 31.6 days
  • Top authors: Rustaurius (78.95%)dominykasgel (22.11%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /119,093 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.01MB] [CPU: ▼8.88ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate WooCommerce Filters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.60 ▼4.31
Dashboard /wp-admin3.31 ▼0.0447.48 ▼12.10
Posts /wp-admin/edit.php3.36 ▲0.0046.96 ▼5.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.24 ▼13.73
Media Library /wp-admin/upload.php3.23 ▲0.0035.47 ▼0.08

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 209 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate WooCommerce Filters
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.21 ▲0.081.59 ▲0.0742.14 ▲3.40
Dashboard /wp-admin2,195 ▲155.66 ▲0.0098.02 ▲6.1843.95 ▲1.03
Posts /wp-admin/edit.php2,097 ▼62.02 ▲0.0538.76 ▼3.4234.86 ▼2.02
Add New Post /wp-admin/post-new.php1,679 ▲14322.03 ▼1.24595.92 ▼82.4548.45 ▼21.73
Media Library /wp-admin/upload.php1,391 ▼34.22 ▼0.0199.96 ▼1.4241.46 ▼3.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/color-filters/ewd-uwcf-templates/table-mode-footer.php
  • 58× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/color-filters/ewd-uwcf-templates/filtering-dropdown.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/color-filters/lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/color-filters/lib/simple-admin-pages/classes/AdminPageSetting.Radio.class.php:22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/color-filters/ewd-uwcf-templates/filtering-swatch.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/color-filters/ewd-uwcf-templates/filtering-shortcode-args.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/color-filters/lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/color-filters/ewd-uwcf-templates/table-mode-product-sizes.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/color-filters/lib/simple-admin-pages/classes/AdminPageSetting.Editor.class.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/color-filters/ewd-uwcf-templates/filtering-ratings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/color-filters/lib/simple-admin-pages/classes/AdminPageSetting.ColorPicker.class.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can look at the official readme.txt

color-filters/color-filters.php 92% from 13 tests

"Ultimate WooCommerce Filters" version 3.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "7.1")

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
Good job! No executable or dangerous file extensions detected13,961 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP812,1792,0236,623
CSS212911903,546
JavaScript697994083,456
Markdown31260336

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity19.71
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes11.82%
▷ Concrete classes5498.18%
▷ Final classes00.00%
Methods303
▷ Static methods41.32%
▷ Public methods28493.73%
▷ Protected methods41.32%
▷ Private methods154.95%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
31 PNG files occupy 1.66MB with 0.94MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/options-asset-info.png0.84KB0.42KB▼ 49.53%
assets/img/options-asset-lock.png1.05KB0.50KB▼ 52.28%
assets/img/ewd-uwcf-dashboard-banner.png233.72KB101.85KB▼ 56.42%
assets/img/dash-asset-badge-old.png152.45KB44.32KB▼ 70.93%
lib/simple-admin-pages/img/options-asset-lock.png1.05KB0.50KB▼ 52.28%