10% dashboard-wiget

Code Review | Dashboard Widget

WordPress plugin Dashboard Widget scored 10% from 54 tests.

About plugin

  • Plugin page: dashboard-wiget
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7.2
  • WordPress version: 5.8.1
  • First release: Feb 17, 2021
  • Latest release: May 24, 2021
  • Number of updates: 40
  • Update frequency: every 2.4 days
  • Top authors: beczkowski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 238 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Dashboardwidget' not found

Server metrics [RAM: ▼1.80MB] [CPU: ▼195.45ms] Passed 4 tests

Server-side resources used by Dashboard Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.86 ▼0.865.69 ▼16.71
Dashboard /wp-admin1.87 ▼1.185.58 ▼41.50
Posts /wp-admin/edit.php1.88 ▼1.325.73 ▼74.94
Add New Post /wp-admin/post-new.php1.87 ▼3.565.52 ▼640.69
Media Library /wp-admin/upload.php1.87 ▼1.135.33 ▼24.68

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Dashboard Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,844 ▲20716.41 ▲0.7713.64 ▲0.0849.02 ▲3.26
Dashboard /wp-admin3,103 ▲1696.02 ▲0.02161.09 ▲10.98101.45 ▼12.23
Posts /wp-admin/edit.php2,741 ▲22.72 ▲0.0069.47 ▲2.1984.23 ▼7.43
Add New Post /wp-admin/post-new.php1,685 ▲218.39 ▼0.32398.42 ▼32.78104.63 ▲3.34
Media Library /wp-admin/upload.php1,821 ▲145.03 ▲0.02145.12 ▼10.07115.44 ▲0.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the _inc/asset/style.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 2 options
    • widget_dashinfo_text_widget
    • widget_dashinfo_html_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dashboard-wiget/dashboardwidget.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dashboard-wiget/_inc/dw-sidebar.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dashboard-wiget/_inc/widget/text.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dashboard-wiget/_inc/widget/html.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dashboard-wiget/_inc/widget/text.php:5

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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: sidebar, dashboard, admin panel, widget, admin

dashboard-wiget/dashboardwidget.php 85% from 13 tests

The main file in "Dashboard Widget" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dashboard-wiget.php" instead of "dashboardwidget.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin361 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.00
▷ Minimum class complexity14.00
▷ Maximum class complexity20.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions9100.00%
▷ Anonymous functions00.00%
▷ Global constants7100.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
There were not PNG files found in your plugin