84% user-and-login-management

Code Review | User and Login Management

WordPress plugin User and Login Management scored84%from 54 tests.

About plugin

  • Plugin page: user-and-login-ma...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 21, 2023
  • Latest release: Oct 9, 2023
  • Number of updates: 5
  • Update frequency: every 28.4 days
  • Top authors: avisaxena (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /456 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▲3.90ms] Passed 4 tests

A check of server-side resources used by User and Login Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5349.56 ▲7.60
Dashboard /wp-admin3.72 ▲0.4159.21 ▲6.41
Posts /wp-admin/edit.php3.77 ▲0.4257.75 ▲11.11
Add New Post /wp-admin/post-new.php6.24 ▲0.3589.86 ▼2.06
Media Library /wp-admin/upload.php3.56 ▲0.3343.07 ▲3.64
User and Login Management /wp-admin/admin.php?page=mouserloginmanagement3.4026.12
Pricing Plans /wp-admin/admin.php?page=moul-mg-pricing3.5747.22

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 74 new files
Database: 1 new table, 9 new options
New tables
wp_moul_mg_users_online
New WordPress options
moul_mg_default_api_key
widget_recent-posts
moul_mg_default_customer_key
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
moul_mg_timeout_value

Browser metrics Passed 4 tests

A check of browser resources used by User and Login Management
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲25515.32 ▲0.942.03 ▲0.1743.54 ▼3.00
Dashboard /wp-admin2,382 ▲1916.57 ▲0.70125.00 ▲8.9277.73 ▲35.30
Posts /wp-admin/edit.php2,291 ▲2023.49 ▲1.4747.99 ▲9.8455.77 ▲21.36
Add New Post /wp-admin/post-new.php1,702 ▲16921.68 ▼1.33671.67 ▲29.9733.99 ▼21.51
Media Library /wp-admin/upload.php1,427 ▲394.24 ▲0.0385.02 ▼20.3077.99 ▲29.27
User and Login Management /wp-admin/admin.php?page=mouserloginmanagement4,5853.2950.93110.27
Pricing Plans /wp-admin/admin.php?page=moul-mg-pricing4,7053.4648.17136.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • moul_mg_default_customer_key
    • widget_theysaidso_widget
    • moul_mg_timeout_value
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • moul_mg_default_api_key

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function moul_mg_show_subnavbar() in wp-content/plugins/user-and-login-management/views/moul-mg-profile-picture.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function moul_mg_show_subnavbar() in wp-content/plugins/user-and-login-management/views/moul-mg-admin-notification-email.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function moul_mg_show_subnavbar() in wp-content/plugins/user-and-login-management/views/moul-mg-roles-capabilities.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

user-and-login-management/user-login-management.php 92% from 13 tests

Analyzing the main PHP file in "User and Login Management" version 1.0.3
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("user-and-login-management.php" instead of "user-login-management.php")

Code Analysis Passed 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 plugin2,396 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP352465802,379
SVG10010
CSS4004
JavaScript3003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.00
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces4
Interfaces0
Traits1
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods47
▷ Static methods36.38%
▷ Public methods3574.47%
▷ Protected methods00.00%
▷ Private methods1225.53%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/icons/logo.png3.21KB1.99KB▼ 37.87%