84% unlimited-brands-for-woocommerce

Code Review | Brands for WooCommerce

WordPress plugin Brands for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: unlimited-brands-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2018
  • Latest release: Dec 17, 2019
  • Number of updates: 39
  • Update frequency: every 15.7 days
  • Top authors: kazbekkadalashvili (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 5,505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.18ms] Passed 4 tests

Analyzing server-side resources used by Brands for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.23 ▼6.91
Dashboard /wp-admin3.31 ▲0.0143.99 ▼4.26
Posts /wp-admin/edit.php3.36 ▲0.0146.50 ▼0.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.31 ▼16.80
Media Library /wp-admin/upload.php3.24 ▲0.0134.55 ▲0.33

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Brands for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.071.78 ▼0.3842.89 ▼3.45
Dashboard /wp-admin2,206 ▲215.87 ▲0.08113.25 ▼0.2143.20 ▲4.06
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0239.87 ▲1.6236.39 ▲2.33
Add New Post /wp-admin/post-new.php1,533 ▼223.80 ▲0.58642.81 ▼55.6854.16 ▼10.55
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.08100.72 ▼10.1247.34 ▲1.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/unlimited-brands-for-woocommerce/includes/widget/widget-filter-brands.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/unlimited-brands-for-woocommerce/includes/widget/widget-list-brands.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unlimited-brands-for-woocommerce/includes/functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unlimited-brands-for-woocommerce/includes/taxonomy-field.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unlimited-brands-for-woocommerce/includes/taxonomy.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/unlimited-brands-for-woocommerce/index.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/unlimited-brands-for-woocommerce/includes/shortcode.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: product brands, woocommerce brands filter, products, supplier, woocommerce brands...

unlimited-brands-for-woocommerce/index.php 85% from 13 tests

"Brands for WooCommerce" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("unlimited-brands-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected6,191 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG2102,684
JavaScript3853492,172
CSS47315490
PHP788172423
Sass2275262
LESS1115152
Ruby1208

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.33
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png14.31KB5.70KB▼ 60.18%
screenshot-2.png2.26KB0.73KB▼ 67.65%
screenshot-1.png44.70KB12.85KB▼ 71.26%