10% dashboard-wiget

Code Review | Dashboard Widget

WordPress plugin Dashboard Widget scored10%from 54 tests.

About plugin

  • Plugin page: dashboard-wiget
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Sep 19, 2022
  • Number of updates: 61
  • Update frequency: every 9.5 days
  • Top authors: beczkowski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,016 total downloads

Benchmarks

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+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Dashboardwidget' not found

Server metrics [RAM: ▼1.82MB] [CPU: ▼52.68ms] Passed 4 tests

Server-side resources used by Dashboard Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.30 ▼33.58
Dashboard /wp-admin2.20 ▼1.146.21 ▼52.24
Posts /wp-admin/edit.php2.20 ▼1.156.17 ▼42.36
Add New Post /wp-admin/post-new.php2.20 ▼3.686.89 ▼82.53
Media Library /wp-admin/upload.php2.20 ▼1.036.41 ▼24.95

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, 8 new options
New WordPress options
widget_dashinfo_text_widget
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_dashinfo_html_widget

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 /2,894 ▲13314.38 ▲0.031.86 ▲0.4047.46 ▲6.78
Dashboard /wp-admin2,296 ▲1165.69 ▲0.0498.23 ▲15.8743.38 ▼2.23
Posts /wp-admin/edit.php2,102 ▲21.96 ▲0.0234.75 ▼1.4931.22 ▼1.78
Add New Post /wp-admin/post-new.php1,527 ▼223.15 ▼0.54644.05 ▲5.0847.50 ▼12.73
Media Library /wp-admin/upload.php1,402 ▲24.15 ▼0.0894.22 ▲1.3741.87 ▲1.11

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+5905
    Function 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: 8 options
    • widget_recent-comments
    • widget_dashinfo_html_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_dashinfo_text_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: 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: 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

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

Optimizations

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: admin, widget, dashboard, admin panel, sidebar

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

The main file in "Dashboard Widget" v. 1.3.2 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:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dashboard-wiget.php" instead of "dashboardwidget.php")

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 plugin375 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5117105364
CSS10011

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.28
Average class complexity21.50
▷ Minimum class complexity19.00
▷ Maximum class complexity24.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ 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