83% restrict-usernames-emails-characters

Code Review | Restrict Usernames Emails Characters

WordPress plugin Restrict Usernames Emails Characters scored 83% from 54 tests.

About plugin

  • Plugin page: restrict-username...
  • Plugin version: 3.1.3
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2016
  • Latest release: Aug 12, 2023
  • Number of updates: 90
  • Update frequency: every 28.1 days
  • Top authors: Benaceur (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

1,000+ active / 21,906 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▲17.49ms] Passed 4 tests

Analyzing server-side resources used by Restrict Usernames Emails Characters
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2250.51 ▲7.00
Dashboard /wp-admin3.57 ▲0.2664.19 ▲17.10
Posts /wp-admin/edit.php3.62 ▲0.2673.13 ▲23.83
Add New Post /wp-admin/post-new.php6.10 ▲0.22153.23 ▲49.72
Media Library /wp-admin/upload.php3.43 ▲0.2055.95 ▲22.02
Restrict Usernames Emails Characters ... /wp-admin/options-general.php?page=restrict_usernames_emails_characters3.58471.42

Server storage [IO: ▲0.36MB] [DB: ▲0.01MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • Illegal file modification detected: 1 file (1.54KB) outside of "wp-content/plugins/restrict-usernames-emails-characters/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/restrict-username-email-character.php
Filesystem: 21 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
BENrueeg_RUE_settings
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
BENrueeg_RUE_settings_Tw
can_compress_scripts
restrict_usernames_emails_characters_ver_base

Browser metrics Passed 4 tests

Checking browser requirements for Restrict Usernames Emails Characters
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.37 ▼1.381.65 ▼0.2044.15 ▲1.58
Dashboard /wp-admin2,215 ▲305.09 ▲0.18107.26 ▼4.2242.54 ▼3.91
Posts /wp-admin/edit.php2,104 ▲152.04 ▲0.0440.40 ▼1.0634.99 ▼4.35
Add New Post /wp-admin/post-new.php1,539 ▲2021.69 ▼1.47580.41 ▲7.1253.20 ▲7.01
Media Library /wp-admin/upload.php1,403 ▲154.17 ▼0.0095.50 ▼12.3543.76 ▼1.12
Restrict Usernames Emails Characters ... /wp-admin/options-general.php?page=restrict_usernames_emails_characters1,7682.4548.2991.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • BENrueeg_RUE_settings
    • restrict_usernames_emails_characters_ver_base
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • BENrueeg_RUE_settings_Tw

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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/restrict-usernames-emails-characters/admin/my-plugins.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ben_plug_restrict_usernames_emails_characters_options' not found in wp-content/plugins/restrict-usernames-emails-characters/classes/page_nl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ben_plug_restrict_usernames_emails_characters_mu_bp' not found in wp-content/plugins/restrict-usernames-emails-characters/classes/classe_errors.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ben_plug_restrict_usernames_emails_characters_validation' not found in wp-content/plugins/restrict-usernames-emails-characters/classes/classe_chars.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ben_plug_restrict_usernames_emails_characters_CHARS' not found in wp-content/plugins/restrict-usernames-emails-characters/classes/classe_mubp.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ben_plug_restrict_usernames_emails_characters_glob' not found in wp-content/plugins/restrict-usernames-emails-characters/classes/classe_val.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ben_plug_restrict_usernames_emails_characters_errors' not found in wp-content/plugins/restrict-usernames-emails-characters/page-setts.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

restrict-usernames-emails-characters/restrict-usernames-emails-characters.php Passed 13 tests

Analyzing the main PHP file in "Restrict Usernames Emails Characters" version 3.1.3
121 characters long description:
Restrict the usernames in registration, email, characters and symbols or email from specific domain names or language ...

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,824 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP106322042,690
PO File1176186604
CSS1443442
JavaScript2185488

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 125)
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity83.50
▷ Minimum class complexity3.00
▷ Maximum class complexity206.00
Average method complexity6.08
▷ Minimum method complexity1.00
▷ Maximum method complexity125.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods130
▷ Static methods00.00%
▷ Public methods12596.15%
▷ Protected methods53.85%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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