84% wsb-brands

Code Review | WSB Brands

WordPress plugin WSB Brands scored84%from 54 tests.

About plugin

  • Plugin page: wsb-brands
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 9, 2018
  • Latest release: Mar 17, 2023
  • Number of updates: 64
  • Update frequency: every 24.8 days
  • Top authors: branahr (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /2,750 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.27ms] Passed 4 tests

An overview of server-side resources used by WSB Brands
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.77 ▼1.92
Dashboard /wp-admin3.31 ▲0.0146.30 ▲1.58
Posts /wp-admin/edit.php3.36 ▲0.0144.17 ▼8.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.80 ▼12.64
Media Library /wp-admin/upload.php3.23 ▲0.0034.43 ▲2.72

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WSB Brands
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.51 ▲0.241.72 ▼0.1145.04 ▼3.15
Dashboard /wp-admin2,221 ▲335.84 ▼0.05100.47 ▼10.8942.00 ▲4.09
Posts /wp-admin/edit.php2,110 ▲182.01 ▼0.0435.37 ▼7.0936.72 ▲2.03
Add New Post /wp-admin/post-new.php1,431 ▼9722.26 ▲4.10594.44 ▼52.3130.68 ▼24.64
Media Library /wp-admin/upload.php1,400 ▲124.18 ▼0.0695.71 ▼4.0538.20 ▼3.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • 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 | 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
Please take a closer look at 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/wsb-brands/includes/class-wsb-brands-carousel-widget.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wsb-brands/includes/class-wsb-brands-widget.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
6 plugin tags: brands addon, brand taxonomy, woocommerce, brands, woocommerce brands...

wsb-brands/wsb-brands.php 92% from 13 tests

The entry point to "WSB Brands" version 1.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,295 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP124706811,519
CSS3547427
PO File1128136286
JavaScript3232063

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods77
▷ Static methods56.49%
▷ Public methods7192.21%
▷ Protected methods00.00%
▷ Private methods67.79%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/slider-right.png1.11KB0.26KB▼ 76.10%
public/img/slider-left.png1.11KB0.26KB▼ 76.23%