72% custom-dashboard-widgets

Code Review | Custom Dashboard Widgets

WordPress plugin Custom Dashboard Widgets scored 72% from 54 tests.

About plugin

  • Plugin page: custom-dashboard-...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Nov 24, 2020
  • Number of updates: 75
  • Update frequency: every 23.4 days
  • Top authors: unitone (56%)AboZain (42.67%)o7abeeb (4%)

Code review

54 tests

User reviews

9 reviews

Install metrics

7,000+ active / 33,176 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.81ms] Passed 4 tests

A check of server-side resources used by Custom Dashboard Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.04 ▼1.50
Dashboard /wp-admin3.29 ▼0.0136.03 ▼13.64
Posts /wp-admin/edit.php3.45 ▲0.1048.43 ▲1.46
Add New Post /wp-admin/post-new.php5.98 ▲0.1087.07 ▼9.55
Media Library /wp-admin/upload.php3.33 ▲0.1037.60 ▲2.70
Dashboard Widgets /wp-admin/options-general.php?page=dashboard-widgets3.2830.93

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Custom Dashboard Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,006 ▼72914.24 ▼0.191.81 ▲0.0142.76 ▼3.92
Dashboard /wp-admin1,405 ▼7865.32 ▼0.5868.83 ▼39.8333.17 ▼13.71
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0634.69 ▼1.0642.34 ▲8.54
Add New Post /wp-admin/post-new.php1,525 ▼1723.40 ▲5.34592.50 ▼9.4749.63 ▼10.22
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0195.84 ▼0.4741.83 ▼2.64
Dashboard Widgets /wp-admin/options-general.php?page=dashboard-widgets2,3822.1632.2942.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=dashboard-widgets
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=dashboard-widgets
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-dashboard-widgets/custom-dashboard-widgets.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=dashboard-widgets
    • > Network (severe)
    http://websites.unitone.ps/aghrady/wp-admin/images/loading.gif - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

custom-dashboard-widgets/custom-dashboard-widgets.php 92% from 13 tests

The main PHP file in "Custom Dashboard Widgets" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,016 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16024738
CSS1100162
PO File1122219109
HTML1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png40.50KB13.94KB▼ 65.59%
assets/screenshot-1.png34.77KB13.40KB▼ 61.45%
assets/screenshot-3.png55.21KB22.58KB▼ 59.09%
assets/screenshot-2.png11.89KB4.54KB▼ 61.82%