83% user-management

Code Review | User Management

WordPress plugin User Management scored83%from 54 tests.

About plugin

  • Plugin page: user-management
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Apr 13, 2021
  • Latest release: May 24, 2022
  • Number of updates: 32
  • Update frequency: every 22.4 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼7.64ms] Passed 4 tests

Analyzing server-side resources used by User Management
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1648.15 ▲3.35
Dashboard /wp-admin3.48 ▲0.1851.68 ▼4.71
Posts /wp-admin/edit.php3.59 ▲0.2452.27 ▼12.87
Add New Post /wp-admin/post-new.php6.06 ▲0.1791.44 ▼13.48
Media Library /wp-admin/upload.php3.40 ▲0.1744.11 ▲0.52
Import / Export /wp-admin/users.php?page=import-export-users-wpexperts3.4536.76

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
uiewp_export_field
widget_recent-comments

Browser metrics Passed 4 tests

User Management: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.37 ▲0.091.71 ▼0.5242.13 ▼5.36
Dashboard /wp-admin2,202 ▲255.59 ▲0.0196.32 ▼4.4639.30 ▼3.18
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0237.80 ▼0.9833.28 ▼1.76
Add New Post /wp-admin/post-new.php1,531 ▲523.12 ▲0.11799.54 ▲106.1949.10 ▼3.93
Media Library /wp-admin/upload.php1,404 ▲44.18 ▲0.02112.22 ▲1.0347.95 ▲1.68
Import / Export /wp-admin/users.php?page=import-export-users-wpexperts1,0622.1352.8940.56

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

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/user-management/includes/settings_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-management/includes/view/settings-view.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/user-management/includes/config.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: user roles, user management, user, user profiles, user approval

user-management/users-imp-exp-wpexperts.php 77% from 13 tests

"User Management" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("user-management.php" instead of "users-imp-exp-wpexperts.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "5.2")

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 detected1,710 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5143181,017
JavaScript211010361
CSS2570332

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity83.00
▷ Minimum class complexity5.00
▷ Maximum class complexity161.00
Average method complexity5.97
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods2781.82%
▷ Protected methods00.00%
▷ Private methods618.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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