99% admin-bar-user-switching

Code Review | Admin Bar User Switching

WordPress plugin Admin Bar User Switching scored 99% from 54 tests.

About plugin

  • Plugin page: admin-bar-user-sw...
  • Plugin version: 1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.9
  • WordPress version: 5.8.1
  • First release: Nov 27, 2014
  • Latest release: Jan 27, 2022
  • Number of updates: 31
  • Update frequency: every 84.5 days
  • Top authors: wpmarkuk (64.52%)wpexpertsio (32.26%)drazenbebic (9.68%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active / 36,221 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Admin Bar User Switching
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0036.87 ▲9.19
Dashboard /wp-admin3.06 ▼0.0038.52 ▼2.89
Posts /wp-admin/edit.php3.11 ▲0.0038.23 ▲2.54
Add New Post /wp-admin/post-new.php5.43 ▼0.0275.69 ▼604.57
Media Library /wp-admin/upload.php3.01 ▲0.0026.78 ▲3.65

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Bar User Switching
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲9815.68 ▼0.325.10 ▲0.1781.33 ▲4.27
Dashboard /wp-admin2,933 ▲376.15 ▼0.11116.75 ▼14.24166.44 ▼11.04
Posts /wp-admin/edit.php2,740 ▼03.24 ▲0.0166.13 ▲1.06140.56 ▲4.21
Add New Post /wp-admin/post-new.php3,735 ▼018.45 ▲0.09452.20 ▲24.32160.25 ▼8.88
Media Library /wp-admin/upload.php1,752 ▼05.56 ▲0.11152.47 ▼0.26186.35 ▲1.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: users, wordpress, user switching

admin-bar-user-switching/admin-bar-user-switching.php 77% from 13 tests

"Admin Bar User Switching" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 365 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/i18n/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin771 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.62
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
▷ Static methods410.53%
▷ Public methods3694.74%
▷ Protected methods00.00%
▷ Private methods25.26%
▷ Named functions375.00%
▷ Anonymous functions125.00%
▷ Global constants10100.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
No PNG images were found in this plugin