84% tyresaddict-woo-tyre-product-filter

Code Review | TyresAddict - Tyre Product Filter for WooCommerce

WordPress plugin TyresAddict - Tyre Product Filter for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: tyresaddict-woo-t...
  • Plugin version: 1.4.17
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Nov 14, 2023
  • Number of updates: 44
  • Update frequency: every 29.8 days
  • Top authors: tyresaddict (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /5,393 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.95ms] Passed 4 tests

An overview of server-side resources used by TyresAddict - Tyre Product Filter for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.65 ▲5.11
Dashboard /wp-admin3.40 ▲0.0653.54 ▼7.27
Posts /wp-admin/edit.php3.52 ▲0.1649.41 ▲1.31
Add New Post /wp-admin/post-new.php5.98 ▲0.1089.90 ▼2.95
Media Library /wp-admin/upload.php3.33 ▲0.1041.00 ▲8.74

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 8 new options
New WordPress options
widget_tyresaddict_woo_tyre_filter_wgt
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
tyresaddict-woo-tyre-product-filter-deferred-admin-notices
theysaidso_admin_options

Browser metrics Passed 4 tests

TyresAddict - Tyre Product Filter for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5514.04 ▼0.121.83 ▲0.1041.41 ▼2.42
Dashboard /wp-admin2,195 ▲175.49 ▼0.1993.30 ▼12.1241.27 ▼0.05
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0236.22 ▲0.6636.80 ▲1.77
Add New Post /wp-admin/post-new.php1,532 ▲623.29 ▲0.05671.91 ▼7.3559.99 ▲13.40
Media Library /wp-admin/upload.php1,424 ▲214.17 ▼0.0399.92 ▼11.0144.30 ▼2.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_tyresaddict_woo_tyre_filter_wgt
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • tyresaddict-woo-tyre-product-filter-deferred-admin-notices
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tyresaddict-woo-tyre-product-filter/includes/FilterWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tyresaddict-woo-tyre-product-filter/templates/filter-white.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

tyresaddict-woo-tyre-product-filter/tyresaddict-woo-tyre-product-filter.php 92% from 13 tests

The main PHP file in "TyresAddict - Tyre Product Filter for WooCommerce" ver. 1.4.17 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 165 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected988 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14283262647
PO File38698208
CSS111078
JavaScript116155

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.75
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods52
▷ Static methods2751.92%
▷ Public methods4790.38%
▷ Protected methods11.92%
▷ Private methods47.69%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants00.00%
▷ Class constants17100.00%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin