73% dashboard-widget-control

Code Review | Disable WordPress Dashboard Widgets

WordPress plugin Disable WordPress Dashboard Widgets scored73%from 54 tests.

About plugin

  • Plugin page: dashboard-widget-...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 19, 2013
  • Latest release: Jul 19, 2013
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: DionRodrigues (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,304 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼34.79ms] Passed 4 tests

A check of server-side resources used by Disable WordPress Dashboard Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.49 ▲1.08
Dashboard /wp-admin3.00 ▼0.3124.27 ▼30.83
Posts /wp-admin/edit.php3.00 ▼0.3626.05 ▼24.54
Add New Post /wp-admin/post-new.php3.00 ▼2.8920.29 ▼73.37
Media Library /wp-admin/upload.php3.00 ▼0.2327.34 ▼10.43

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Disable WordPress Dashboard Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,466 ▼28014.11 ▼0.151.66 ▼0.1437.46 ▼2.02
Dashboard /wp-admin1,872 ▼3205.42 ▲0.5392.55 ▼16.5074.39 ▲30.08
Posts /wp-admin/edit.php2,107 ▲181.97 ▼0.1938.37 ▲1.4334.04 ▲0.05
Add New Post /wp-admin/post-new.php1,680 ▲15022.32 ▲4.31606.40 ▼18.7547.81 ▼6.48
Media Library /wp-admin/upload.php1,403 ▲184.22 ▼0.03109.10 ▲5.0361.17 ▲11.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dashboard-widget-control/trunk/disablewidgets.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dashboard-widget-control/disablewidgets.php:14

User-side errors Passed 1 test

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


Plugin configuration 86% from 29 tests

readme.txt 81% 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:
  • Screenshots: Please a description for screenshot #0 in dashboard-widget-control/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === dashboard-widget-control === )
  • Screenshots: Screenshot #1 (The Hide WordPress Dashboard Widgets Plugin Interface.) image required
The official readme.txt is a good inspiration

dashboard-widget-control/disablewidgets.php 92% from 13 tests

The principal PHP file in "Disable WordPress Dashboard Widgets" v. 1.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dashboard-widget-control.php" instead of "disablewidgets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin186 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions10100.00%
▷ Anonymous functions00.00%
▷ 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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.55KB0.96KB▼ 38.08%
trunk/images/icon.png1.55KB0.96KB▼ 38.08%