78% members

Code Review | Members - Membership & User Role Editor Plugin

WordPress plugin Members - Membership & User Role Editor Plugin scored78%from 54 tests.

About plugin

  • Plugin page: members
  • Plugin version: 3.2.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 17, 2009
  • Latest release: Nov 30, 2023
  • Number of updates: 101
  • Update frequency: every 51.4 days
  • Top authors: greenshady (42.57%)caseproof (36.63%)ptahdunbar (12.87%)supercleanse (7.92%)cartpauj (3.96%)

Code review

54 tests

User reviews

1019 reviews

Install metrics

200,000+ active /4,760,024 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.33MB] [CPU: ▲4.10ms] 75% from 4 tests

Analyzing server-side resources used by Members - Membership & User Role Editor Plugin
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 593.60ms on /wp-admin/admin.php?page=members-payments)
PageMemory (MB)CPU Time (ms)
Home /4.25 ▲0.7948.39 ▲8.26
Dashboard /wp-admin4.83 ▲1.4855.02 ▼5.27
Posts /wp-admin/edit.php4.88 ▲1.5258.61 ▲12.42
Add New Post /wp-admin/post-new.php7.47 ▲1.5899.36 ▲1.00
Media Library /wp-admin/upload.php4.74 ▲1.5145.08 ▲12.56
Settings /wp-admin/admin.php?page=members-settings4.7947.08
Add-Ons /wp-admin/admin.php?page=members-settings&view=add-ons4.7747.87
About Us /wp-admin/admin.php?page=members-about4.6642.17
Payments /wp-admin/admin.php?page=members-payments4.74593.60
Add New Role /wp-admin/admin.php?page=members5.0644.81
Roles /wp-admin/admin.php?page=roles4.8446.54

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 200 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
widget_members-widget-users
can_compress_scripts
db_upgraded
widget_recent-posts
widget_members-widget-login
members_activated
widget_theysaidso_widget
members_addons_migrated
theysaidso_admin_options
...

Browser metrics Passed 4 tests

A check of browser resources used by Members - Membership & User Role Editor Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10614.19 ▼0.151.65 ▼0.0344.91 ▲1.66
Dashboard /wp-admin2,259 ▲825.64 ▼0.0095.72 ▼2.3342.67 ▲0.54
Posts /wp-admin/edit.php2,164 ▲612.02 ▲0.0337.34 ▼1.4932.71 ▼3.08
Add New Post /wp-admin/post-new.php6,732 ▲5,19722.11 ▼2.93910.56 ▲239.2366.81 ▼14.34
Media Library /wp-admin/upload.php1,464 ▲644.22 ▲0.0598.51 ▲3.6741.63 ▼0.05
Settings /wp-admin/admin.php?page=members-settings2,2768.46182.07128.80
Add-Ons /wp-admin/admin.php?page=members-settings&view=add-ons1,8702.1530.0935.60
About Us /wp-admin/admin.php?page=members-about1,1572.2524.9134.04
Payments /wp-admin/admin.php?page=members-payments1,6282.0926.2138.00
Add New Role /wp-admin/admin.php?page=members7,3412.7269.5338.60
Roles /wp-admin/admin.php?page=roles1,6432.4937.3632.01

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: 11 options
    • members_notifications
    • widget_members-widget-login
    • widget_recent-comments
    • members_activated
    • widget_theysaidso_widget
    • widget_members-widget-users
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • members_addons_migrated
    • ...

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/members/admin/views/promotion.php
    • > /wp-content/plugins/members/admin/class-notifications.php
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Members\\Core_Create_Caps\\add_action() in wp-content/plugins/members/addons/members-core-create-caps/addon.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Members\\AddOns\\AdminAccess\\add_action() in wp-content/plugins/members/addons/members-admin-access/app/functions-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/members/addons/members-admin-access/config/app.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members/inc/functions-roles.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/members/addons/members-role-hierarchy/addon.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members/inc/functions-admin-bar.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members/inc/functions-shortcodes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members/addons/members-role-hierarchy/admin/class-manage-roles.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members/inc/functions-private-site.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Members\\AddOns\\AdminAccess\\trailingslashit() in wp-content/plugins/members/addons/members-admin-access/bootstrap/app.php:28

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
The official readme.txt might help

members/members.php 92% from 13 tests

"Members - Membership & User Role Editor Plugin" version 3.2.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 274 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin10,450 lines of code in 178 files:
LanguageFilesBlank linesComment linesLines of code
PHP1043,0947,1917,795
CSS520719937
JavaScript30326395934
Markdown193640737
Sass18024
SVG180018
JSON1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.83
▷ Minimum class complexity2.00
▷ Maximum class complexity136.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes47
▷ Abstract classes12.13%
▷ Concrete classes4697.87%
▷ Final classes2452.17%
Methods316
▷ Static methods226.96%
▷ Public methods26383.23%
▷ Protected methods226.96%
▷ Private methods319.81%
Functions284
▷ Named functions26994.72%
▷ Anonymous functions155.28%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.23MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
addons/members-role-hierarchy/screenshot-1.png38.47KB19.03KB▼ 50.54%
img/icon-addon.png20.09KB8.89KB▼ 55.76%
img/bee.png9.29KB10.44KB0.00%
addons/members-role-levels/screenshot-1.png24.96KB11.80KB▼ 52.71%
addons/members-role-levels/screenshot-2.png53.96KB24.42KB▼ 54.74%