94% admin-bar-position

Code Review | Admin Bar Position

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

About plugin

  • Plugin page: admin-bar-position
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Mar 23, 2016
  • Latest release: Feb 16, 2022
  • Number of updates: 12
  • Update frequency: every 179.7 days
  • Top authors: kanakogi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active / 13,997 total downloads


Plugin footprint Passed 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.01MB] [CPU: ▼305.01ms] Passed 4 tests

Analyzing server-side resources used by Admin Bar Position
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.93 ▲5.71
Dashboard /wp-admin3.42 ▲0.0133.84 ▲1.11
Posts /wp-admin/edit.php3.65 ▲0.0139.35 ▲3.32
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.11 ▼1,224.68
Media Library /wp-admin/upload.php3.30 ▲0.0123.61 ▲0.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Admin Bar Position
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,902 ▲14816.49 ▲0.748.76 ▲1.692.91 ▼0.23
Dashboard /wp-admin2,892 ▲386.06 ▼0.11120.51 ▼14.18154.26 ▲1.44
Posts /wp-admin/edit.php2,694 ▲73.24 ▲0.0161.69 ▼3.43135.01 ▼1.91
Add New Post /wp-admin/post-new.php1,661 ▼016.39 ▲0.25417.29 ▼0.90151.51 ▼7.12
Media Library /wp-admin/upload.php1,698 ▼05.53 ▲0.03140.22 ▲3.26186.02 ▼2.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/admin-bar-position/position-adminbar.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

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

"Admin Bar Position" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("admin-bar-position.php" instead of "position-adminbar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin51 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods3100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin