10% user-dashboard

Code Review | User-dashboard

WordPress plugin User-dashboard scored10%from 54 tests.

About plugin

  • Plugin page: user-dashboard
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jan 4, 2013
  • Latest release: Jan 7, 2013
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: anildhiman (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /7,186 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5653
    File registration.php is deprecated since version 3.1.0 with no alternative available. This file no longer needs to be included.

Server metrics [RAM: ▼1.91MB] [CPU: ▼55.94ms] Passed 4 tests

Analyzing server-side resources used by User-dashboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.91 ▼38.00
Dashboard /wp-admin2.10 ▼1.205.94 ▼49.14
Posts /wp-admin/edit.php2.10 ▼1.265.41 ▼43.77
Add New Post /wp-admin/post-new.php2.10 ▼3.797.07 ▼92.42
Media Library /wp-admin/upload.php2.10 ▼1.137.08 ▼38.41

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

Browser metrics Passed 4 tests

User-dashboard: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.211.70 ▼0.0943.39 ▼0.24
Dashboard /wp-admin2,206 ▲154.86 ▲0.03108.92 ▼4.7243.57 ▼3.67
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0537.03 ▲2.9132.20 ▼3.67
Add New Post /wp-admin/post-new.php1,514 ▼2017.65 ▼5.75686.39 ▲17.2253.54 ▼4.51
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.0295.12 ▼2.0440.47 ▼1.93

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5653
    File registration.php is deprecated since version 3.1.0 with no alternative available. This file no longer needs to be included.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/user-dashboard/includes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/user-dashboard/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/user-dashboard/filters.php:2

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (After login dashboard), #2 (Before login dashboard), #3 (Login screen), #4 (Registration screen), #5 (Forgot password screen), #6 (Profile pic screen), #7 (Profile edit screen)
Please take inspiration from this readme.txt

user-dashboard/index.php 85% from 13 tests

"User-dashboard" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("user-dashboard.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 441 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
No dangerous file extensions were detected570 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP56824570

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity27.50
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods421.05%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
15 PNG files occupy 0.33MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/login.png14.20KB5.86KB▼ 58.76%
images/profile.png12.47KB5.47KB▼ 56.16%
images/profile-pic.png17.83KB6.63KB▼ 62.78%
screenshot-3.png33.13KB14.76KB▼ 55.45%
screenshot-1.png27.82KB12.43KB▼ 55.32%