83% user-dashboard-easy-digital-downloads

Code Review | User Dashboard - Easy Digital Downloads

WordPress plugin User Dashboard - Easy Digital Downloads scored83%from 54 tests.

About plugin

  • Plugin page: user-dashboard-ea...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 11, 2021
  • Latest release: Jul 15, 2022
  • Number of updates: 10
  • Update frequency: every 30.7 days
  • Top authors: aminnz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,040 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by User Dashboard - Easy Digital Downloads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.67 ▲1.60
Dashboard /wp-admin3.31 ▼0.0463.13 ▼6.08
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▼7.28
Add New Post /wp-admin/post-new.php5.88 ▼0.0084.44 ▼20.04
Media Library /wp-admin/upload.php3.23 ▲0.0039.42 ▲2.22

Server storage [IO: ▲0.01MB] [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: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by User Dashboard - Easy Digital Downloads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.37 ▲0.001.77 ▲0.0843.61 ▲0.42
Dashboard /wp-admin2,195 ▲215.55 ▼0.0286.90 ▼6.0439.74 ▼3.57
Posts /wp-admin/edit.php2,097 ▲151.98 ▼0.0435.51 ▼2.9235.94 ▼0.60
Add New Post /wp-admin/post-new.php6,362 ▲4,83627.55 ▲4.37821.30 ▲137.4468.16 ▲16.05
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.01103.47 ▲0.5444.49 ▼2.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
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 plugin_dir_url() in wp-content/plugins/user-dashboard-easy-digital-downloads/user-dashboard-for-edd.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (easy digital downloads customer dashboard) image missing
Please take inspiration from this readme.txt

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

The main PHP file in "User Dashboard - Easy Digital Downloads" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("user-dashboard-easy-digital-downloads.php" instead of "user-dashboard-for-edd.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 169 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 plugin334 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS1179157
PHP2271196
SVG10144
JavaScript24737

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin