83% remote-dashboard-widget

Code Review | Remote Dashboard Widget

WordPress plugin Remote Dashboard Widget scored83%from 54 tests.

About plugin

  • Plugin page: remote-dashboard-...
  • Plugin version: 0.0.30
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: May 24, 2023
  • Latest release: Dec 1, 2023
  • Number of updates: 8
  • Update frequency: every 27.9 days
  • Top authors: wpdashboardwidget (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /223 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.06ms] Passed 4 tests

Server-side resources used by Remote Dashboard Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.76 ▼5.67
Dashboard /wp-admin3.31 ▼0.0446.55 ▼13.73
Posts /wp-admin/edit.php3.36 ▲0.0048.53 ▲2.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.67 ▼3.42
Media Library /wp-admin/upload.php3.23 ▲0.0034.71 ▲2.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 764 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Remote Dashboard Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.27 ▲0.131.76 ▼0.0738.25 ▼4.81
Dashboard /wp-admin2,195 ▲185.62 ▼0.0294.38 ▲2.9041.92 ▲0.68
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0739.44 ▼2.8135.81 ▼3.10
Add New Post /wp-admin/post-new.php1,526 ▼023.00 ▼0.17678.11 ▲67.1956.81 ▲3.80
Media Library /wp-admin/upload.php1,403 ▼04.14 ▼0.07102.50 ▲3.4641.89 ▼1.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 209× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/remote-dashboard-widget/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/remote-dashboard-widget/vendor/cmb2/cmb2/includes/types/CMB2_Type_Counter_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIFilter' not found in wp-content/plugins/remote-dashboard-widget/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableResources.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/remote-dashboard-widget/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/remote-dashboard-widget/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Nofollow.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef_HTML_Nmtokens' not found in wp-content/plugins/remote-dashboard-widget/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIFilter_DisableExternal' not found in wp-content/plugins/remote-dashboard-widget/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/DisableExternalResources.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/remote-dashboard-widget/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Image.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/remote-dashboard-widget/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv4.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/remote-dashboard-widget/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Date.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • License uri: Invalid url: "GPLv2"
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in remote-dashboard-widget/assets to your readme.txt
The official readme.txt might help

remote-dashboard-widget/dashboard-widget.php 77% from 13 tests

Analyzing the main PHP file in "Remote Dashboard Widget" version 0.0.30
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("remote-dashboard-widget.php" instead of "dashboard-widget.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin72,811 lines of code in 481 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP3115,52917,00625,456
JSON4006,778
CSS142581,1914,591
JavaScript83625841,434
Sass17306291,411
Markdown52610791
SVG10126
INI1111

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 232)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.80
▷ Minimum class complexity1.00
▷ Maximum class complexity539.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity232.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes311
▷ Abstract classes247.72%
▷ Concrete classes28792.28%
▷ Final classes00.00%
Methods1,352
▷ Static methods15711.61%
▷ Public methods1,08480.18%
▷ Protected methods17412.87%
▷ Private methods946.95%
Functions43
▷ Named functions3888.37%
▷ Anonymous functions511.63%
Constants102
▷ Global constants109.80%
▷ Class constants9290.20%
▷ Public constants92100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor/cmb2/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
vendor/cmb2/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
vendor/cmb2/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%