84% wpum-username-length

Code Review | WP User Manager Username Length

WordPress plugin WP User Manager Username Length scored84%from 54 tests.

About plugin

  • Plugin page: wpum-username-length
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jun 28, 2016
  • Latest release: Jul 31, 2021
  • Number of updates: 37
  • Update frequency: every 50.4 days
  • Top authors: alessandro.tesoro (83.78%)wpusermanager (18.92%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.38ms] Passed 4 tests

Analyzing server-side resources used by WP User Manager Username Length
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.81 ▼2.08
Dashboard /wp-admin3.33 ▲0.0250.67 ▲2.28
Posts /wp-admin/edit.php3.38 ▲0.0248.12 ▼9.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.58 ▼23.94
Media Library /wp-admin/upload.php3.25 ▲0.0237.17 ▲5.57

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 119 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP User Manager Username Length
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.301.61 ▼0.7046.62 ▼9.13
Dashboard /wp-admin2,195 ▲185.62 ▼0.0098.04 ▼25.2142.03 ▼13.72
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0140.36 ▼2.4135.25 ▼3.47
Add New Post /wp-admin/post-new.php1,526 ▼023.27 ▼0.30683.01 ▼8.8852.13 ▲2.74
Media Library /wp-admin/upload.php1,403 ▲64.24 ▲0.10108.22 ▲7.5749.43 ▲3.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 93× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpum-username-length/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: username length, wp user manager, wpum, username

wpum-username-length/wpum-username-length.php Passed 13 tests

The entry point to "WP User Manager Username Length" version 2.0.4 is a PHP file that has certain tags in its header comment area
92 characters long description:
Addon for WP User Manager, Set a minimum and maximum length for usernames upon registration.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,842 lines of code in 114 files:
LanguageFilesBlank linesComment linesLines of code
PHP1074759372,412
JSON400388
Markdown314042

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity2.63
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes100
▷ Abstract classes11.00%
▷ Concrete classes9999.00%
▷ Final classes11.01%
Methods132
▷ Static methods75.30%
▷ Public methods8564.39%
▷ Protected methods3828.79%
▷ Private methods96.82%
Functions11
▷ Named functions545.45%
▷ Anonymous functions654.55%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin