84% user-mail-only-register

Code Review | User Mail Only Register

WordPress plugin User Mail Only Register scored84%from 54 tests.

About plugin

  • Plugin page: user-mail-only-re...
  • Plugin version: 2.10
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jan 30, 2019
  • Latest release: Oct 29, 2023
  • Number of updates: 68
  • Update frequency: every 25.5 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,580 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.46ms] Passed 4 tests

A check of server-side resources used by User Mail Only Register
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.44 ▲2.10
Dashboard /wp-admin3.34 ▲0.0441.53 ▼5.22
Posts /wp-admin/edit.php3.39 ▲0.0444.33 ▲0.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.77 ▼20.54
Media Library /wp-admin/upload.php3.26 ▲0.0433.01 ▼0.43
User Mail Only Register /wp-admin/options-general.php?page=usermailonlyregister3.2328.22

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
usermailonlyregister
widget_usermailonlyregisterwidgetitem
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Mail Only Register
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲5014.26 ▼0.261.60 ▼0.0437.59 ▼4.21
Dashboard /wp-admin2,202 ▲285.64 ▲0.1390.00 ▲2.2740.57 ▼2.16
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0339.05 ▲3.1137.68 ▲2.88
Add New Post /wp-admin/post-new.php1,531 ▲522.92 ▼0.13615.48 ▼73.4848.72 ▼9.25
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0099.72 ▲4.0239.86 ▼2.50
User Mail Only Register /wp-admin/options-general.php?page=usermailonlyregister1,0772.1122.6725.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-mail-only-register/lib/class-usermailonlyregisteradmin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-mail-only-register/lib/class-usermailonlyregisterwidgetitem.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/user-mail-only-register/lib/class-usermailonlyregister.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-mail-only-register/lib/class-usermailonlyregisteradmin.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: users, email, register

user-mail-only-register/usermailonlyregister.php 92% from 13 tests

Analyzing the main PHP file in "User Mail Only Register" version 2.10
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-mail-only-register.php" instead of "usermailonlyregister.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin632 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5112285632

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity35.33
▷ Minimum class complexity2.00
▷ Maximum class complexity63.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin