83% registered-user-dashboard-widget

Code Review | Registered User Dashboard Widget

WordPress plugin Registered User Dashboard Widget scored83%from 54 tests.

About plugin

  • Plugin page: registered-user-d...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Jul 9, 2021
  • Latest release: Jul 9, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: outsourcingvn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /275 total downloads

Benchmarks

Plugin footprint 83% 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: ▼8.76ms] Passed 4 tests

This is a short check of server-side resources used by Registered User Dashboard Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.53 ▲4.96
Dashboard /wp-admin3.28 ▼0.0640.86 ▼20.87
Posts /wp-admin/edit.php3.36 ▲0.0046.42 ▲0.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.82 ▼13.66
Media Library /wp-admin/upload.php3.23 ▲0.0038.22 ▼0.75

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Registered User Dashboard Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲13215.52 ▲0.869.31 ▲7.7646.74 ▲6.74
Dashboard /wp-admin2,282 ▲1076.58 ▲0.93165.89 ▲67.1264.12 ▲24.93
Posts /wp-admin/edit.php2,106 ▲32.29 ▲0.3534.35 ▼4.5234.14 ▲0.30
Add New Post /wp-admin/post-new.php1,686 ▲16022.42 ▼1.11687.18 ▲6.0356.52 ▼0.19
Media Library /wp-admin/upload.php1,403 ▲34.44 ▲0.1399.31 ▼15.4643.79 ▼2.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/registered-user-dashboard-widget/register-user.php:24

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: You can look at the official readme.txt

registered-user-dashboard-widget/register-user.php 69% from 13 tests

The main PHP file in "Registered User Dashboard Widget" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "5.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("registered-user-dashboard-widget.php" instead of "register-user.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin64 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121463
Markdown1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin