78% promobar

Code Review | PromoBar by BestWebSoft - Customizable Advertisement Banner for WordPress Website

WordPress plugin PromoBar by BestWebSoft - Customizable Advertisement Banner for WordPress Website scored78%from 54 tests.

About plugin

  • Plugin page: promobar
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 3, 2015
  • Latest release: Oct 31, 2023
  • Number of updates: 38
  • Update frequency: every 83.3 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /7,903 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.60ms] Passed 4 tests

An overview of server-side resources used by PromoBar by BestWebSoft - Customizable Advertisement Banner for WordPress Website
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.23 ▲5.09
Dashboard /wp-admin3.38 ▲0.0748.08 ▼4.45
Posts /wp-admin/edit.php3.49 ▲0.1449.75 ▼2.80
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.13 ▼12.23
Media Library /wp-admin/upload.php3.30 ▲0.0739.07 ▲6.00

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 132 new files
Database: no new tables, 8 new options
New WordPress options
prmbr_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
bstwbsftwppdtplgns_options
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for PromoBar by BestWebSoft - Customizable Advertisement Banner for WordPress Website
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11514.30 ▲0.191.89 ▲0.3444.34 ▲5.29
Dashboard /wp-admin2,242 ▲715.61 ▼0.0192.00 ▲0.1246.35 ▲1.56
Posts /wp-admin/edit.php2,204 ▲1042.19 ▲0.2234.22 ▼4.5730.38 ▼2.96
Add New Post /wp-admin/post-new.php1,625 ▲9723.44 ▲0.18664.03 ▼57.9658.38 ▲6.94
Media Library /wp-admin/upload.php1,441 ▲384.28 ▲0.1199.07 ▲1.1244.28 ▲1.71
BWS Panel /wp-admin/promobar.php?page=prmbr-bws-panel260.420.1414.44
PromoBar /wp-admin/promobar.php260.420.095.35
Settings /wp-admin/promobar-settings.php260.420.066.67
Add New /wp-admin/promobar-new.php260.420.114.92

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/promobar/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/promobar/includes/class-prmbr-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/promobar/bws_menu/class-bws-settings.php:1453
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/promobar/promobar.php on line 339
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/promobar/promobar.php on line 339
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/promobar/includes/class-prmbr-add-new.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/promobar/promobar.php on line 339

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/promobar.php?page=prmbr-bws-panel
    • > Network (severe)
    wp-admin/promobar.php?page=prmbr-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/promobar.php
    • > Network (severe)
    wp-admin/promobar.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/promobar-settings.php
    • > Network (severe)
    wp-admin/promobar-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/promobar-new.php
    • > Network (severe)
    wp-admin/promobar-new.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (PromoBar on the homepage in top position.), #2 (PromoBar list page.), #3 (PromoBar individual Settings.)
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

promobar/promobar.php Passed 13 tests

The principal PHP file in "PromoBar by BestWebSoft - Customizable Advertisement Banner for WordPress Website" v. 1.2.0 is loaded by WordPress automatically on each request
93 characters long description:
Add and display HTML advertisement on WordPress website. Customize bar styles and appearance.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin24,195 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PO File144,9238,66012,003
PHP115288455,846
CSS111552555,461
JavaScript856148718
SVG400167

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity58.20
▷ Minimum class complexity6.00
▷ Maximum class complexity210.00
Average method complexity8.33
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods3384.62%
▷ Protected methods00.00%
▷ Private methods615.38%
Functions84
▷ Named functions84100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
64 PNG files occupy 3.23MB with 1.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/images/tooltip_icons.png0.81KB0.82KB0.00%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_888888_256x240.png6.88KB4.20KB▼ 38.90%
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_75_dadada_1x400.png0.31KB0.18KB▼ 39.81%
screenshot-2.png84.39KB25.68KB▼ 69.57%
bws_menu/icons/plugins/bike-rental.png6.86KB2.68KB▼ 60.89%