10% dp-toolbar-plus

Code Review | (dp) Toolbar Plus

WordPress plugin (dp) Toolbar Plus scored 10% from 54 tests.

About plugin

  • Plugin page: dp-toolbar-plus
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Sep 10, 2021
  • Latest release: Sep 16, 2021
  • Number of updates: 13
  • Update frequency: every 0.5 days
  • Top authors: getdp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 70 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/dp-toolbar-plus/inc/Plugin.php+11
    require_once(AdminBarSettings.php): failed to open stream: No such file or directory

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

This is a short check of server-side resources used by (dp) Toolbar Plus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1240.50 ▲18.25
Dashboard /wp-admin3.06 ▲0.0053.02 ▲0.62
Posts /wp-admin/edit.php3.11 ▲0.0046.36 ▲0.18
Add New Post /wp-admin/post-new.php5.42 ▼0.0295.60 ▼586.29
Media Library /wp-admin/upload.php3.00 ▲0.0035.66 ▲1.22

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for (dp) Toolbar Plus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.88 ▲0.2510.47 ▼1.5053.24 ▼2.46
Dashboard /wp-admin2,970 ▲366.02 ▲0.10149.97 ▼12.15126.73 ▲6.55
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0170.82 ▲5.1298.29 ▲2.18
Add New Post /wp-admin/post-new.php1,683 ▼018.48 ▼0.28380.15 ▼11.81124.34 ▲2.29
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.01150.86 ▼1.09126.53 ▲1.45

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 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just 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 plugin_dir_path() in wp-content/plugins/dp-toolbar-plus/dp-toolbar-plus.php:17

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: admin-bar, toolbar

dp-toolbar-plus/dp-toolbar-plus.php Passed 13 tests

"(dp) Toolbar Plus" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
137 characters long description:
Get more control of WordPress Toolbar (Admin-Bar) - Hide toolbar from front-end based on user roles and capabilities, auto hide/show etc.

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 detected520 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10130148518
CSS1001
JavaScript1001

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.32
Average class complexity9.17
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods39
▷ Static methods3282.05%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin