89% yith-woocommerce-brands-add-on

Code Review | YITH WooCommerce Brands Add-On

WordPress plugin YITH WooCommerce Brands Add-On scored89%from 54 tests.

About plugin

  • Plugin page: yith-woocommerce-...
  • Plugin version: 2.18.0
  • PHP version: 7.4.16
  • WordPress compatibility: 8.1-6.4
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: Nov 20, 2023
  • Number of updates: 176
  • Update frequency: every 17.6 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10,000+ active /596,840 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.02MB] [CPU: ▼4.24ms] Passed 4 tests

Server-side resources used by YITH WooCommerce Brands Add-On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.92 ▼10.41
Dashboard /wp-admin3.33 ▲0.0346.23 ▼2.21
Posts /wp-admin/edit.php3.39 ▲0.0249.18 ▼3.62
Add New Post /wp-admin/post-new.php5.92 ▲0.0292.42 ▼0.73
Media Library /wp-admin/upload.php3.26 ▲0.0234.26 ▲0.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 319 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
yit_recently_activated
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for YITH WooCommerce Brands Add-On
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.30 ▲0.021.56 ▼0.1935.86 ▼10.80
Dashboard /wp-admin2,201 ▲215.58 ▼0.0692.49 ▼5.1841.41 ▼2.70
Posts /wp-admin/edit.php2,110 ▲102.09 ▲0.1341.11 ▲1.6238.58 ▼2.67
Add New Post /wp-admin/post-new.php1,532 ▲623.42 ▼0.39683.12 ▲26.9860.12 ▼0.01
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.0696.58 ▼1.9642.67 ▲1.45

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • yit_recently_activated

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (19 tag instead of maximum 10)
You can take inspiration from this readme.txt

yith-woocommerce-brands-add-on/init.php 77% from 13 tests

"YITH WooCommerce Brands Add-On" version 2.18.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 380 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("6.2" instead of "8.1")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yith-woocommerce-brands-add-on.php" instead of "init.php")

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
Success! There were no dangerous files found in this plugin42,024 lines of code in 265 files:
LanguageFilesBlank linesComment linesLines of code
PHP1752,8116,05615,504
JavaScript471,3338359,354
CSS201,6722439,219
PO File101,8152,2774,943
SVG9012,948
XML212948
HTML20328

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity41.23
▷ Minimum class complexity1.00
▷ Maximum class complexity336.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods420
▷ Static methods6816.19%
▷ Public methods34080.95%
▷ Protected methods6014.29%
▷ Private methods204.76%
Functions149
▷ Named functions13993.29%
▷ Anonymous functions106.71%
Constants19
▷ Global constants1894.74%
▷ Class constants15.26%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
30 PNG files occupy 1.10MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/get-premium-brands.png1,066.88KB278.41KB▼ 73.90%
plugin-fw/assets/css/jquery-ui/images/ui-icons_2e83ff_256x240.png3.69KB4.18KB0.00%
plugin-fw/assets/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
plugin-fw/assets/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
plugin-fw/assets/images/no-sidebar.png0.92KB0.08KB▼ 90.72%