62% create-custom-dashboard-widget

Code Review | Custom Dashboard Widget

WordPress plugin Custom Dashboard Widget scored62%from 54 tests.

About plugin

  • Plugin page: create-custom-das...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1.1
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: May 2, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: duogeek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,833 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼15.36ms] Passed 4 tests

A check of server-side resources used by Custom Dashboard Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2527.83 ▼9.94
Dashboard /wp-admin3.40 ▲0.0528.71 ▼32.52
Posts /wp-admin/edit.php3.47 ▲0.1239.38 ▼12.11
Add New Post /wp-admin/post-new.php5.72 ▼0.1777.18 ▼6.86
Media Library /wp-admin/upload.php3.42 ▲0.1932.10 ▼1.09
DuoGeek /wp-admin/admin.php?page=duogeek-panel3.3827.45
Help /wp-admin/admin.php?page=duogeek-panel-help3.3827.02
Licenses /wp-admin/admin.php?page=duogeek-pro-licenses3.3825.25
Custom Dashboard Widget /wp-admin/admin.php?page=dashboard-settings3.3827.69

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 177 new files
Database: 1 new table, 8 new options
New tables
wp_widgets_table
New WordPress options
widget_theysaidso_widget
recovery_mode_email_last_sent
theysaidso_admin_options
jal_db_version
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Dashboard Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13013.48 ▼1.102.02 ▲0.3842.55 ▲3.17
Dashboard /wp-admin2,268 ▲835.17 ▼0.70115.44 ▲5.6539.49 ▼3.27
Posts /wp-admin/edit.php2,158 ▲692.40 ▲0.4143.11 ▲6.8235.39 ▲4.74
Add New Post /wp-admin/post-new.php1,773 ▲25926.42 ▲9.03584.90 ▼76.3734.97 ▼28.35
Media Library /wp-admin/upload.php1,450 ▲624.62 ▲0.2199.34 ▲3.2539.80 ▼2.67
DuoGeek /wp-admin/admin.php?page=duogeek-panel7751.146.7325.41
Help /wp-admin/admin.php?page=duogeek-panel-help8492.1527.3622.29
Licenses /wp-admin/admin.php?page=duogeek-pro-licenses8372.0435.4130.46
Custom Dashboard Widget /wp-admin/admin.php?page=dashboard-settings1,91511.72201.85122.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_widgets_table
  • Zombie WordPress options detected upon uninstall: 8 options
    • jal_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dashboard-settings
    • > Notice in wp-content/plugins/create-custom-dashboard-widget/duogeek/duogeek-panel.php+147
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=duogeek-panel
    • > Error in wp-content/plugins/create-custom-dashboard-widget/duogeek/duogeek-panel.php+413
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/create-custom-dashboard-widget/duogeek/duogeek-panel.php:413
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): DuoGeekPlugins->duogeek_panel_cb()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% 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
Please fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'AdminDashboard' not found in wp-content/plugins/create-custom-dashboard-widget/dashboard-files/modules/class.dashboard.widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/create-custom-dashboard-widget/duogeek/class.customPostType.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/create-custom-dashboard-widget/duogeek/helper.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/create-custom-dashboard-widget/dashboard-files/includes/admin-internal.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/create-custom-dashboard-widget/duogeek/duogeek-panel.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/create-custom-dashboard-widget/dashboard-files/includes/login-internal.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=dashboard-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=dashboard-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === create-custom-dashboard-widget === )
The official readme.txt might help

create-custom-dashboard-widget/dashboardwidget.php 92% from 13 tests

This is the main PHP file of "Custom Dashboard Widget" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("create-custom-dashboard-widget.php" instead of "dashboardwidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected18,198 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
CSS559133009,894
JavaScript55639322,790
PHP83091441,505
Sass1326241,352
LESS1326331,343
SVG3001,314

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.81
Average class complexity23.25
▷ Minimum class complexity3.00
▷ Maximum class complexity59.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods3587.50%
▷ Protected methods512.50%
▷ Private methods00.00%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants10
▷ Global constants10100.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
66 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
duogeek/inc/icheck/skins/futurico/futurico.png1.69KB1.61KB▼ 5.07%
duogeek/inc/icheck/skins/flat/blue@2x.png3.14KB2.79KB▼ 11.25%
duogeek/inc/icheck/skins/polaris/polaris@2x.png16.37KB6.77KB▼ 58.66%
duogeek/inc/icheck/skins/minimal/pink.png1.12KB1.45KB0.00%
duogeek/inc/icheck/skins/minimal/red.png1.10KB1.45KB0.00%