84% wp-guest-bar

Code Review | WP Guest Bar

WordPress plugin WP Guest Bar scored84%from 54 tests.

About plugin

  • Plugin page: wp-guest-bar
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Jul 9, 2014
  • Latest release: Oct 20, 2023
  • Number of updates: 19
  • Update frequency: every 178.4 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.55ms] Passed 4 tests

A check of server-side resources used by WP Guest Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.35 ▼2.61
Dashboard /wp-admin3.33 ▼0.0243.62 ▼16.31
Posts /wp-admin/edit.php3.38 ▲0.0245.76 ▼2.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.47 ▼19.84
Media Library /wp-admin/upload.php3.25 ▲0.0232.74 ▼3.42
WP Guest Bar /wp-admin/options-general.php?page=wpgov_wpgb3.2230.73

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

WP Guest Bar: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.37 ▲0.021.63 ▼0.0238.37 ▼0.69
Dashboard /wp-admin2,199 ▲225.51 ▼0.1183.13 ▼5.6937.88 ▼5.22
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0334.02 ▼1.2034.25 ▼0.99
Add New Post /wp-admin/post-new.php1,531 ▲221.06 ▼2.17670.26 ▲24.9168.24 ▲10.28
Media Library /wp-admin/upload.php1,404 ▲74.18 ▲0.0796.07 ▼2.1639.96 ▼1.38
WP Guest Bar /wp-admin/options-general.php?page=wpgov_wpgb8052.0022.6928.08

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-guest-bar/guestbar.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

wp-guest-bar/guestbar.php 92% from 13 tests

The main PHP file in "WP Guest Bar" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-guest-bar.php" instead of "guestbar.php")

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 plugin92 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1181391
Markdown1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin