84% custom-new-user-notification

Code Review | Custom New User Notification

WordPress plugin Custom New User Notification scored84%from 54 tests.

About plugin

  • Plugin page: custom-new-user-n...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: May 30, 2017
  • Latest release: Jun 29, 2023
  • Number of updates: 18
  • Update frequency: every 123.4 days
  • Top authors: rafasashi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Custom New User Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.12 ▲1.01
Dashboard /wp-admin3.32 ▲0.0148.13 ▼4.24
Posts /wp-admin/edit.php3.37 ▲0.0152.96 ▲1.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.07 ▲0.05
Media Library /wp-admin/upload.php3.24 ▲0.0136.97 ▲1.08
Registration Email /wp-admin/options-general.php?page=custom-new-user-notification3.2839.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom New User Notification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.27 ▼0.381.78 ▼0.2339.71 ▼5.04
Dashboard /wp-admin2,204 ▲275.64 ▼0.0187.67 ▼10.4040.10 ▼2.92
Posts /wp-admin/edit.php2,106 ▲62.16 ▲0.1636.61 ▲0.5134.72 ▼1.91
Add New Post /wp-admin/post-new.php1,551 ▲2023.11 ▲0.07679.40 ▲34.8858.20 ▼0.43
Media Library /wp-admin/upload.php1,400 ▼04.30 ▲0.1197.71 ▼8.0047.33 ▲2.35
Registration Email /wp-admin/options-general.php?page=custom-new-user-notification1,8958.23163.7262.63

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-new-user-notification/admin/includes.php:123
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/custom-new-user-notification/custom-new-user-notification.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: new user, new user notification, user registration, welcome mail, registration email

custom-new-user-notification/custom-new-user-notification.php Passed 13 tests

This is the main PHP file of "Custom New User Notification" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
78 characters long description:
This plugin allows you to customize the email sent on a new user registration.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin205 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP213979194
CSS1639
Markdown1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected