90% admin-bar-plugin-switcher

Code Review | Admin Bar Plugin Switcher

WordPress plugin Admin Bar Plugin Switcher scored 90% from 54 tests.

About plugin

  • Plugin page: admin-bar-plugin-...
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Feb 24, 2019
  • Number of updates: 12
  • Update frequency: every 110.5 days
  • Top authors: dimadin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Admin Bar Plugin Switcher
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.48 ▼1.35
Dashboard /wp-admin3.32 ▲0.0248.47 ▼0.87
Posts /wp-admin/edit.php3.37 ▲0.0247.48 ▼2.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.79 ▼16.46
Media Library /wp-admin/upload.php3.25 ▲0.0239.75 ▲5.08

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Admin Bar Plugin Switcher
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.41 ▼0.161.87 ▲0.0544.35 ▼0.64
Dashboard /wp-admin2,220 ▲294.88 ▲0.00111.14 ▲9.9636.83 ▼10.53
Posts /wp-admin/edit.php2,106 ▲172.06 ▲0.0240.88 ▲1.9736.21 ▲0.93
Add New Post /wp-admin/post-new.php1,544 ▲2523.07 ▼0.17663.84 ▲83.3157.97 ▲6.15
Media Library /wp-admin/upload.php1,405 ▲144.16 ▼0.0293.66 ▼2.1939.68 ▼4.48

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: plugins, admin bar, deactivation, activation

admin-bar-plugin-switcher/admin-bar-plugin-switcher.php 92% from 13 tests

The principal PHP file in "Admin Bar Plugin Switcher" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

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 plugin164 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP139113164

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods450.00%
▷ Protected methods450.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin