83% wp-branding-bar

Code Review | WP Branding Bar

WordPress plugin WP Branding Bar scored83%from 54 tests.

About plugin

  • Plugin page: wp-branding-bar
  • Plugin version: 1.5.6 Plays nice wit...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Jan 7, 2013
  • Latest release: May 9, 2014
  • Number of updates: 12
  • Update frequency: every 40.7 days
  • Top authors: stacyvlasits (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,010 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
Installer ran successfully

Server metrics [RAM: ▼0.30MB] [CPU: ▼9.80ms] Passed 4 tests

Analyzing server-side resources used by WP Branding Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.78 ▼33.67
Dashboard /wp-admin3.34 ▲0.0447.29 ▼0.52
Posts /wp-admin/edit.php3.46 ▲0.1051.65 ▲2.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.78 ▼6.02
Media Library /wp-admin/upload.php3.25 ▲0.0234.53 ▲1.01
WP Branding Bars /wp-admin/options-general.php?page=wp_bb_menu_slug3.2634.91

Server storage [IO: ▲0.35MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Branding Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,201 ▲45515.67 ▲1.298.98 ▲7.2047.75 ▲4.15
Dashboard /wp-admin2,352 ▲1646.45 ▲1.36133.58 ▲27.7543.07 ▼0.04
Posts /wp-admin/edit.php2,255 ▲1693.39 ▲1.2855.06 ▲19.7334.77 ▲4.65
Add New Post /wp-admin/post-new.php1,533 ▲1923.30 ▲5.87636.10 ▲30.4236.00 ▼18.88
Media Library /wp-admin/upload.php1,394 ▲64.16 ▼0.0283.62 ▼11.3144.08 ▲3.59
WP Branding Bars /wp-admin/options-general.php?page=wp_bb_menu_slug1,1053.1543.3957.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-branding-bar/plugin.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots require images: #1 (WP Branding Bar), #2 (WP Branding Bar settings page)
Please take inspiration from this readme.txt

wp-branding-bar/plugin.php 77% from 13 tests

"WP Branding Bar" version 1.5.6 Plays nice wit...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1.5.6 Plays nice wit...")
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-branding-bar.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin594 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16644436
JavaScript2112113
CSS17245

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.32MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/utlogo.png8.44KB3.27KB▼ 61.28%
images/default-right.png3.52KB0.08KB▼ 97.59%
screenshot-2.png123.27KB41.51KB▼ 66.33%
images/default-left.png3.53KB0.09KB▼ 97.51%
images/default-background.png2.75KB0.12KB▼ 95.77%