94% admin-bar-toggle

Code Review | Admin Bar Toggle

WordPress plugin Admin Bar Toggle scored 94% from 54 tests.

About plugin

  • Plugin page: admin-bar-toggle
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.4
  • WordPress version: 5.8.1
  • First release: Jan 30, 2012
  • Latest release: Aug 17, 2015
  • Number of updates: 16
  • Update frequency: every 80.9 days
  • Top authors: jamesckemp (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active / 15,590 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Admin Bar Toggle
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1335.13 ▲13.88
Dashboard /wp-admin3.07 ▲0.0146.31 ▼8.61
Posts /wp-admin/edit.php3.12 ▲0.0170.25 ▲20.53
Add New Post /wp-admin/post-new.php5.43 ▼0.01108.79 ▼546.95
Media Library /wp-admin/upload.php3.01 ▲0.0139.62 ▲4.48

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Bar Toggle
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,981 ▲38516.25 ▲0.7017.42 ▲7.9350.22 ▼6.40
Dashboard /wp-admin2,989 ▲525.95 ▼0.11162.80 ▲7.37122.14 ▲3.57
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0182.32 ▲14.98102.97 ▲4.93
Add New Post /wp-admin/post-new.php1,591 ▼2418.83 ▼2.69396.22 ▲105.02121.03 ▲15.39
Media Library /wp-admin/upload.php1,807 ▼04.99 ▼0.02162.47 ▼5.23122.63 ▼9.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/admin-bar-toggle/jck-adminbar-toggle.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found


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
5 plugin tags: toggle, jquery, admin, admin bar, ui

admin-bar-toggle/jck-adminbar-toggle.php 92% from 13 tests

The main file in "Admin Bar Toggle" v. 1.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("admin-bar-toggle.php" instead of "jck-adminbar-toggle.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected158 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin