73% customized-admin-bar

Code Review | Custom Admin Bar

WordPress plugin Custom Admin Bar scored73%from 54 tests.

About plugin

  • Plugin page: customized-admin-bar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.3
  • WordPress version: 6.3.1
  • First release: May 11, 2018
  • Latest release: Sep 24, 2019
  • Number of updates: 4
  • Update frequency: every 125.5 days
  • Top authors: creativehassan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /580 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.77MB] [CPU: ▼49.79ms] Passed 4 tests

This is a short check of server-side resources used by Custom Admin Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.276.48 ▼36.98
Dashboard /wp-admin2.25 ▼1.069.87 ▼41.27
Posts /wp-admin/edit.php2.25 ▼1.1111.64 ▼33.45
Add New Post /wp-admin/post-new.php2.25 ▼3.6410.98 ▼87.46
Media Library /wp-admin/upload.php2.25 ▼0.989.78 ▼23.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Admin Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.37 ▼1.002.13 ▲0.2042.73 ▼1.53
Dashboard /wp-admin2,240 ▲495.22 ▼0.65100.56 ▼16.4138.93 ▼8.40
Posts /wp-admin/edit.php2,119 ▲272.32 ▲0.2636.05 ▼2.4232.62 ▼6.73
Add New Post /wp-admin/post-new.php1,537 ▲817.74 ▼0.68648.51 ▼5.9433.70 ▼26.88
Media Library /wp-admin/upload.php1,416 ▲314.42 ▲0.19100.28 ▲6.7442.77 ▲2.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/customized-admin-bar/include/admin_menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/customized-admin-bar/css/custom-css.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

customized-admin-bar/custom-admin-bar.php 85% from 13 tests

Analyzing the main PHP file in "Custom Admin Bar" version 1.0.0
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("customized-admin-bar.php" instead of "custom-admin-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected125 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP41236121
JavaScript1003
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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