83% gs-woo-brands

Code Review | Discover the Best Woocommerce Product Brands Plugin for WordPress - Woocommerce Brands Plugin

WordPress plugin Discover the Best Woocommerce Product Brands Plugin for WordPress - Woocommerce Brands Plugin scored83%from 54 tests.

About plugin

  • Plugin page: gs-woo-brands
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.3
  • WordPress version: 6.3.1
  • First release: Feb 27, 2018
  • Latest release: Aug 31, 2023
  • Number of updates: 43
  • Update frequency: every 46.8 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /4,105 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
Install script ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▲5.12ms] Passed 4 tests

An overview of server-side resources used by Discover the Best Woocommerce Product Brands Plugin for WordPress - Woocommerce Brands Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3642.14 ▼3.37
Dashboard /wp-admin3.72 ▲0.4162.30 ▲11.93
Posts /wp-admin/edit.php3.77 ▲0.4162.68 ▲12.94
Add New Post /wp-admin/post-new.php6.22 ▲0.3393.55 ▲5.87
Media Library /wp-admin/upload.php3.56 ▲0.3342.73 ▲6.06

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Discover the Best Woocommerce Product Brands Plugin for WordPress - Woocommerce Brands Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲20914.40 ▲0.032.00 ▼0.1640.65 ▼5.61
Dashboard /wp-admin2,376 ▲1966.19 ▲0.65136.72 ▲42.1454.86 ▲15.01
Posts /wp-admin/edit.php2,308 ▲2053.45 ▲1.4757.01 ▲14.1036.66 ▼1.06
Add New Post /wp-admin/post-new.php1,572 ▲3623.25 ▲0.08639.07 ▼57.1338.33 ▼17.16
Media Library /wp-admin/upload.php1,447 ▲474.19 ▲0.0688.24 ▼39.3244.92 ▼11.39

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/gs-woo-brands/templates/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-woo-brands/woocommerce-brand.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-woo-brands/gs-common-pages/gs-brands-common-pages.php:3
    • > PHP Notice
      Undefined variable: terms in wp-content/plugins/gs-woo-brands/templates/gs_brand_carousal.php on line 5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gs-woo-brands/templates/gs_brand_carousal.php on line 5
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/gs-woo-brands/templates/widget.php on line 1
    • > PHP Notice
      Undefined variable: terms in wp-content/plugins/gs-woo-brands/templates/gs_brand_carousal2.php on line 5
    • > PHP Notice
      Undefined variable: brand_dropdown in wp-content/plugins/gs-woo-brands/templates/widget.php on line 38
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gs-woo-brands/templates/gs_brand_carousal2.php on line 5
    • > PHP Notice
      Undefined variable: show_list in wp-content/plugins/gs-woo-brands/templates/widget.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 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
7 plugin tags: woocommerce product brand plugin, ultimate woocommerce brands plugin, best woocommerce brands plugin, brands woocommerce plugin, woocommerce brands plugin...

gs-woo-brands/woocommerce-brand.php 69% from 13 tests

The entry point to "Discover the Best Woocommerce Product Brands Plugin for WordPress - Woocommerce Brands Plugin" version 1.3.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gs-woo-brands.php" instead of "woocommerce-brand.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.3" instead of "7.4")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 392 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin5,968 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP146897773,018
CSS7112391,383
SVG410867
Sass11016521
JavaScript5711158
JSON10021

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity49.67
▷ Minimum class complexity5.00
▷ Maximum class complexity94.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods140
▷ Static methods3625.71%
▷ Public methods10575.00%
▷ Protected methods64.29%
▷ Private methods2920.71%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/icon.png0.75KB0.79KB0.00%