84% welcome-user-widget

Code Review | Welcome User Widget

WordPress plugin Welcome User Widget scored84%from 54 tests.

About plugin

  • Plugin page: welcome-user-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Dec 19, 2012
  • Latest release: Mar 31, 2014
  • Number of updates: 20
  • Update frequency: every 23.4 days
  • Top authors: narin1975 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /5,487 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.31ms] Passed 4 tests

A check of server-side resources used by Welcome User Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.61 ▼4.13
Dashboard /wp-admin3.32 ▼0.0350.82 ▼14.29
Posts /wp-admin/edit.php3.37 ▲0.0153.55 ▲7.79
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.40 ▼20.93
Media Library /wp-admin/upload.php3.24 ▲0.0134.74 ▼1.87

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_display_username
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Welcome User Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼0.901.67 ▼0.3045.31 ▲3.34
Dashboard /wp-admin2,206 ▲184.83 ▼1.05103.54 ▲1.5740.03 ▼3.99
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0240.12 ▲1.3833.88 ▼2.87
Add New Post /wp-admin/post-new.php1,514 ▼617.73 ▼5.32619.74 ▼19.0951.17 ▼0.99
Media Library /wp-admin/upload.php1,382 ▼04.33 ▲0.1297.50 ▼3.0641.19 ▼1.82

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welcome-user-widget/welcome_user_widget.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: widget, user login, welcome, display, userid

welcome-user-widget/welcome_user_widget.php 85% from 13 tests

The principal PHP file in "Welcome User Widget" v. 1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 179 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("welcome-user-widget.php" instead of "welcome_user_widget.php")

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
Everything looks great! No dangerous files found in this plugin20 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181520

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin