78% ultimate-dashboard

Code Review | Ultimate Dashboard - Custom WordPress Dashboard

WordPress plugin Ultimate Dashboard - Custom WordPress Dashboard scored78%from 54 tests.

About plugin

  • Plugin page: ultimate-dashboard
  • Plugin version: 3.7.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 18, 2016
  • Latest release: Nov 22, 2023
  • Number of updates: 149
  • Update frequency: every 18.2 days
  • Top authors: davidvongries (100%)

Code review

54 tests

User reviews

83 reviews

Install metrics

60,000+ active /567,559 total downloads

Benchmarks

Plugin footprint 83% 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.39MB] [CPU: ▲11.86ms] Passed 4 tests

Server-side resources used by Ultimate Dashboard - Custom WordPress Dashboard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.77 ▲1.3043.93 ▲2.35
Dashboard /wp-admin4.74 ▲1.4359.54 ▲4.54
Posts /wp-admin/edit.php4.78 ▲1.4271.86 ▲22.71
Add New Post /wp-admin/post-new.php7.37 ▲1.48104.86 ▲17.82
Media Library /wp-admin/upload.php4.66 ▲1.4255.18 ▲22.85
Login Redirect /wp-admin/edit.php?post_type=udb_widgets&page=udb_login_redirect4.6651.58
Settings /wp-admin/edit.php?post_type=udb_widgets&page=udb_settings4.7957.31
Add New /wp-admin/post-new.php?post_type=udb_widgets5.1265.62
White Label /wp-admin/edit.php?post_type=udb_widgets&page=udb_branding4.6659.35
Modules /wp-admin/edit.php?post_type=udb_widgets&page=udb_features4.6553.10
Tools /wp-admin/edit.php?post_type=udb_widgets&page=udb_tools4.6451.25
Admin Bar Editor /wp-admin/edit.php?post_type=udb_widgets&page=udb_admin_bar4.8051.50
Admin Pages /wp-admin/edit.php?post_type=udb_admin_page4.7256.22
Admin Menu Editor /wp-admin/edit.php?post_type=udb_widgets&page=udb_admin_menu4.6952.34
All Widgets /wp-admin/edit.php?post_type=udb_widgets4.7254.30

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 333 new files
Database: no new tables, 15 new options
New WordPress options
udb_recent_admin_menu
theysaidso_admin_options
udb_login_customizer_flush_url
widget_recent-posts
widget_theysaidso_widget
udb_plugin_activated
udb_settings
udb_compat_widget_status
udb_install_date
udb_compat_old_option
...

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate Dashboard - Custom WordPress Dashboard
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19314.33 ▲0.051.96 ▲0.0827.91 ▼19.20
Dashboard /wp-admin2,310 ▲1335.59 ▼0.0596.76 ▼1.1594.47 ▲53.77
Posts /wp-admin/edit.php2,226 ▲1262.11 ▲0.1041.70 ▲2.7938.23 ▲6.11
Add New Post /wp-admin/post-new.php1,626 ▲10023.75 ▲0.72732.38 ▲111.0160.50 ▼3.14
Media Library /wp-admin/upload.php1,534 ▲1374.14 ▼0.0395.77 ▼7.5477.42 ▲32.26
Login Redirect /wp-admin/edit.php?post_type=udb_widgets&page=udb_login_redirect1,1682.1947.5544.23
Settings /wp-admin/edit.php?post_type=udb_widgets&page=udb_settings2,4178.32201.8094.48
Add New /wp-admin/post-new.php?post_type=udb_widgets2,5788.70203.7993.73
White Label /wp-admin/edit.php?post_type=udb_widgets&page=udb_branding2,5252.8678.0843.24
Modules /wp-admin/edit.php?post_type=udb_widgets&page=udb_features1,2221.7830.1744.41
Tools /wp-admin/edit.php?post_type=udb_widgets&page=udb_tools1,1061.8228.7843.44
Admin Bar Editor /wp-admin/edit.php?post_type=udb_widgets&page=udb_admin_bar4,6782.5663.4843.18
Admin Pages /wp-admin/edit.php?post_type=udb_admin_page1,2072.0839.9736.71
Admin Menu Editor /wp-admin/edit.php?post_type=udb_widgets&page=udb_admin_menu6,3613.2589.1445.26
All Widgets /wp-admin/edit.php?post_type=udb_widgets1,1912.0634.8936.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 15 options in the database
    • udb_settings
    • udb_compat_delete_login_customizer_page
    • can_compress_scripts
    • theysaidso_admin_options
    • udb_compat_widget_status
    • udb_compat_old_option
    • udb_login_customizer_flush_url
    • udb_install_date
    • widget_recent-comments
    • udb_recent_admin_menu
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 143× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/ultimate-dashboard/modules/admin-page/class-admin-page-module.php
    • > /wp-content/plugins/ultimate-dashboard/modules/login-customizer/class-login-customizer-output.php
    • > /wp-content/plugins/ultimate-dashboard/modules/branding/templates/fields/admin-menu-bg-color.php
    • > /wp-content/plugins/ultimate-dashboard/modules/admin-page/ajax/change-active-status.php
    • > /wp-content/plugins/ultimate-dashboard/modules/widget/inc/save-post.php
    • > /wp-content/plugins/ultimate-dashboard/helpers/class-widget-helper.php
    • > /wp-content/plugins/ultimate-dashboard/modules/login-redirect/templates/fields/wp-admin-redirect-url.php
    • > /wp-content/plugins/ultimate-dashboard/modules/admin-menu/inc/not-doing-ajax.php
    • > /wp-content/plugins/ultimate-dashboard/modules/admin-page/inc/save-post.php
    • > /wp-content/plugins/ultimate-dashboard/modules/widget/templates/metaboxes/priority.php
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-pro-control.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_customize_preview() in wp-content/plugins/ultimate-dashboard/modules/login-customizer/templates/udb-login-page.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Color_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-color-control.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-toggle-switch-control.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/settings/class-custom-css-setting.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-range-control.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-control.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-color-picker-control.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-login-template-control.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Image_Control' not found in wp-content/plugins/ultimate-dashboard/modules/login-customizer/controls/class-udb-customize-image-control.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
You can take inspiration from this readme.txt

ultimate-dashboard/ultimate-dashboard.php Passed 13 tests

The entry point to "Ultimate Dashboard - Custom WordPress Dashboard" version 3.7.10 is a PHP file that has certain tags in its header comment area
82 characters long description:
Create a custom Dashboard and give the WordPress admin area a more meaningful use.

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
Everything looks great! No dangerous files found in this plugin30,661 lines of code in 303 files:
LanguageFilesBlank linesComment linesLines of code
PHP1563,8054,03010,938
SVG50129,447
JSON7003,458
CSS225151332,714
JavaScript234594612,147
TypeScript90472451,957

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.35
Average class complexity15.77
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes44
▷ Abstract classes00.00%
▷ Concrete classes44100.00%
▷ Final classes00.00%
Methods373
▷ Static methods266.97%
▷ Public methods35595.17%
▷ Protected methods82.14%
▷ Private methods102.68%
Functions100
▷ Named functions88.00%
▷ Anonymous functions9292.00%
Constants5
▷ Global constants5100.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
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/feature/assets/img/login-redirect.png6.46KB3.11KB▼ 51.88%
modules/feature/assets/img/admin-menu.png4.06KB0.87KB▼ 78.67%
assets/img/logo.png3.88KB3.89KB0.00%
modules/feature/assets/img/login-customizer.png4.54KB1.12KB▼ 75.37%
modules/feature/assets/img/admin-pages.png4.79KB1.23KB▼ 74.39%