73% user-dashboard-for-easy-digital-downloads

Code Review | User Dashboard For Easy Digital Downloads

WordPress plugin User Dashboard For Easy Digital Downloads scored73%from 54 tests.

About plugin

  • Plugin page: user-dashboard-fo...
  • Plugin version: 0.20.10
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 5, 2020
  • Latest release: Dec 11, 2020
  • Number of updates: 10
  • Update frequency: every 0.6 days
  • Top authors: websiteguiderteam1618 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /441 total downloads

Benchmarks

Plugin footprint 65% 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.01MB] [CPU: ▼5.48ms] Passed 4 tests

An overview of server-side resources used by User Dashboard For Easy Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.99 ▲2.20
Dashboard /wp-admin3.31 ▼0.0449.96 ▼10.25
Posts /wp-admin/edit.php3.36 ▲0.0047.28 ▲0.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.48 ▼10.09
Media Library /wp-admin/upload.php3.23 ▲0.0032.55 ▼2.33

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

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

Browser metrics Passed 4 tests

A check of browser resources used by User Dashboard For Easy Digital Downloads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼0.564.33 ▲2.7439.77 ▼3.51
Dashboard /wp-admin2,209 ▲185.84 ▲0.9393.86 ▼7.7536.60 ▼1.69
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0340.49 ▲4.1534.02 ▲2.07
Add New Post /wp-admin/post-new.php1,533 ▲423.22 ▼0.21683.84 ▲46.9255.81 ▼11.38
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.0693.39 ▼2.3443.32 ▼1.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/user-dashboard-for-easy-digital-downloads/uninstall.php+33
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/admin/dashboard/dashboard-template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/public/shortcodes/shortcode-dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/templates/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function edd_get_users_purchases() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/templates/downloads-history.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/public/shortcodes/shortcode-login.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/templates/purchased-items.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/templates/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/admin/dashboard/class-user-dashboard-for-edd-template.php:155
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ud_for_edd_custom_html_login_form() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/templates/form-login.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-dashboard-for-easy-digital-downloads/admin/account/login-functions.php:185

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: Please take inspiration from this readme.txt

user-dashboard-for-easy-digital-downloads/user-dashboard-for-edd.php 85% from 13 tests

"User Dashboard For Easy Digital Downloads" version 0.20.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("user-dashboard-for-easy-digital-downloads.php" instead of "user-dashboard-for-edd.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
No dangerous file extensions were detected2,686 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP313635061,632
CSS212615859
SVG100119
JavaScript29676

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity4.67
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods4297.67%
▷ Protected methods00.00%
▷ Private methods12.33%
Functions61
▷ Named functions6098.36%
▷ Anonymous functions11.64%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/websiteguider_logo.png4.88KB3.61KB▼ 26.00%