84% hide-admin-topbar

Code Review | Hide Admin Top Bar

WordPress plugin Hide Admin Top Bar scored84%from 54 tests.

About plugin

  • Plugin page: hide-admin-topbar
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.3
  • WordPress version: 6.3.1
  • First release: Dec 17, 2019
  • Latest release: Dec 17, 2019
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: dhirajsuthar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Hide Admin Top Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0634.72 ▼7.01
Dashboard /wp-admin3.31 ▲0.0159.91 ▲6.71
Posts /wp-admin/edit.php3.36 ▲0.0049.40 ▼1.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.75 ▼5.79
Media Library /wp-admin/upload.php3.23 ▲0.0034.03 ▼4.96

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

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

Browser metrics Passed 4 tests

Hide Admin Top Bar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,626 ▼12013.63 ▼0.571.15 ▼0.7541.19 ▼1.62
Dashboard /wp-admin2,206 ▲185.88 ▼0.09100.91 ▼9.6544.28 ▼1.81
Posts /wp-admin/edit.php2,089 ▼02.11 ▲0.0936.38 ▼4.0935.66 ▼0.70
Add New Post /wp-admin/post-new.php1,535 ▲1623.37 ▲0.05680.16 ▼11.7562.63 ▲1.53
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.0598.86 ▼5.7345.34 ▼0.48

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-admin-topbar/hide-admin-topbar.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: hide topbar, topbar, adminbar, admin bar

hide-admin-topbar/hide-admin-topbar.php Passed 13 tests

The main file in "Hide Admin Top Bar" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
Hide admin topbar from fontend side for all the users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1266

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin