77% bs-banners

Code Review | BS Banners

WordPress plugin BS Banners scored 77% from 54 tests.

About plugin

  • Plugin page: bs-banners
  • Plugin version: 3.6.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0
  • WordPress version: 6.3.1
  • First release: Aug 24, 2019
  • Latest release: Jun 13, 2022
  • Number of updates: 78
  • Update frequency: every 13.1 days
  • Top authors: albanotoska (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 5,244 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.64ms] Passed 4 tests

Analyzing server-side resources used by BS Banners
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.94 ▼3.57
Dashboard /wp-admin3.32 ▲0.0245.99 ▼6.61
Posts /wp-admin/edit.php3.37 ▲0.0249.32 ▲1.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.15 ▼17.38
Media Library /wp-admin/upload.php3.25 ▲0.0237.80 ▲1.65

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for BS Banners
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.24 ▼1.401.98 ▲0.2237.82 ▼1.53
Dashboard /wp-admin2,208 ▲265.85 ▲0.95109.22 ▲5.7337.02 ▼4.41
Posts /wp-admin/edit.php2,091 ▼12.05 ▲0.0539.16 ▲0.3536.43 ▲4.45
Add New Post /wp-admin/post-new.php1,516 ▲217.70 ▲0.09647.59 ▼37.8455.15 ▲2.35
Media Library /wp-admin/upload.php1,387 ▼14.20 ▼0.0093.52 ▼9.1641.56 ▼2.86

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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 take a closer look at the following
  • 20× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/bs-banners/templates/banner-sample-8.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-20.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-17.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-1.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-4.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-18.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-10.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-12.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-14.php
    • > /wp-content/plugins/bs-banners/templates/banner-sample-13.php
  • 115× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/bs-banners/templates/banner-sample-19.php on line 33
    • > PHP Notice
      Undefined variable: checkbox in wp-content/plugins/bs-banners/templates/banner-sample-14.php on line 31
    • > PHP Notice
      Undefined variable: checkbox in wp-content/plugins/bs-banners/templates/banner-sample-15.php on line 31
    • > PHP Notice
      Undefined variable: title2 in wp-content/plugins/bs-banners/templates/banner-sample-11.php on line 34
    • > PHP Notice
      Undefined variable: title2 in wp-content/plugins/bs-banners/templates/banner-sample-19.php on line 34
    • > PHP Notice
      Undefined variable: image_src in wp-content/plugins/bs-banners/templates/banner-sample-8.php on line 26
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/bs-banners/templates/banner-sample-18.php on line 44
    • > PHP Notice
      Undefined variable: a_target in wp-content/plugins/bs-banners/templates/banner-sample-9.php on line 43
    • > PHP Notice
      Undefined variable: title2 in wp-content/plugins/bs-banners/templates/banner-sample-16.php on line 41
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/bs-banners/templates/banner-sample-4.php on line 30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (18 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (Easy to use interface.) image missing
You can take inspiration from this readme.txt

bs-banners/bunnyshortcodes.php 85% from 13 tests

Analyzing the main PHP file in "BS Banners" version 3.6.8
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bs-banners.php" instead of "bunnyshortcodes.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 268 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,496 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS1142302,037
PHP231031411,425
JavaScript111534

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods225.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/icon.png3.39KB1.98KB▼ 41.68%
images/icon.png3.76KB1.97KB▼ 47.51%