62% users-control

Code Review | UsersControl - Users Profile, Free or Paid Subscriptions, User Access Restriction & Members Directory

WordPress plugin UsersControl - Users Profile, Free or Paid Subscriptions, User Access Restriction & Members Directory scored62%from 54 tests.

About plugin

  • Plugin page: users-control
  • Plugin version: 1.0.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Dec 7, 2022
  • Latest release: Aug 29, 2023
  • Number of updates: 40
  • Update frequency: every 7.4 days
  • Top authors: istmoplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /429 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲2.00MB] [CPU: ▲10.58ms] Passed 4 tests

An overview of server-side resources used by UsersControl - Users Profile, Free or Paid Subscriptions, User Access Restriction & Members Directory
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.17 ▲1.7051.57 ▲12.33
Dashboard /wp-admin5.40 ▲2.1061.24 ▲8.33
Posts /wp-admin/edit.php5.45 ▲2.1069.60 ▲25.46
Add New Post /wp-admin/post-new.php8.00 ▲2.1197.02 ▼1.73
Media Library /wp-admin/upload.php5.33 ▲2.1054.63 ▲23.40
User Pages /wp-admin/admin.php?page=userscontrol-pages5.3152.55
Custom Forms /wp-admin/admin.php?page=userscontrol-forms5.2442.21
Users Control /wp-admin/admin.php?page=userscontrol5.3066.89
Settings /wp-admin/admin.php?page=userscontrol&tab=settings5.4653.83
Notifications /wp-admin/admin.php?page=userscontrol&tab=mail5.3554.59
Subscriptions /wp-admin/admin.php?page=userscontrol&tab=subscriptions5.2857.49
Payment Gateways /wp-admin/admin.php?page=userscontrol&tab=gateway5.3553.20
Custom Fields /wp-admin/admin.php?page=userscontrol&tab=fields5.2944.93
More Functionality! /wp-admin/admin.php?page=userscontrol&tab=pro5.2448.42
Licensing /wp-admin/admin.php?page=userscontrol&tab=licence5.2346.13

Server storage [IO: ▲4.29MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 553 new files
Database: 5 new tables, 11 new options
New tables
wp_userscontrol_subscriptions
wp_userscontrol_membership_post_rel
wp_userscontrol_orders
wp_userscontrol_membership_packages
wp_userscontrol_role_post_rel
New WordPress options
userscontrol_profile_nav
userscontrol_options
can_compress_scripts
userscontrol_pro_active
theysaidso_admin_options
widget_recent-comments
userscontrol_ini_setup
db_upgraded
widget_recent-posts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for UsersControl - Users Profile, Free or Paid Subscriptions, User Access Restriction & Members Directory
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,136 ▲39015.66 ▲1.3113.89 ▲11.9237.65 ▼8.63
Dashboard /wp-admin2,330 ▲1456.29 ▲0.38124.17 ▲21.1792.10 ▲54.60
Posts /wp-admin/edit.php2,232 ▲1433.04 ▲1.0048.20 ▲7.8961.55 ▲26.43
Add New Post /wp-admin/post-new.php1,628 ▲9518.43 ▼4.69663.02 ▲45.64119.47 ▲60.14
Media Library /wp-admin/upload.php1,532 ▲1475.26 ▲1.0694.26 ▼39.5097.83 ▲47.13
User Pages /wp-admin/admin.php?page=userscontrol-pages1,1372.8443.5741.59
Custom Forms /wp-admin/admin.php?page=userscontrol-forms9902.8342.0549.61
Users Control /wp-admin/admin.php?page=userscontrol1,8386.6657.65155.07
Settings /wp-admin/admin.php?page=userscontrol&tab=settings1,8293.1643.5275.26
Notifications /wp-admin/admin.php?page=userscontrol&tab=mail3,47711.33273.0281.28
Subscriptions /wp-admin/admin.php?page=userscontrol&tab=subscriptions1,3792.8338.0570.35
Payment Gateways /wp-admin/admin.php?page=userscontrol&tab=gateway1,3652.8637.5552.76
Custom Fields /wp-admin/admin.php?page=userscontrol&tab=fields3,0503.3246.7563.42
More Functionality! /wp-admin/admin.php?page=userscontrol&tab=pro1,1162.8739.7072.37
Licensing /wp-admin/admin.php?page=userscontrol&tab=licence1,0432.8036.9165.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_userscontrol_orders
    • wp_userscontrol_membership_packages
    • wp_userscontrol_membership_post_rel
    • wp_userscontrol_role_post_rel
    • wp_userscontrol_subscriptions
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_theysaidso_widget
    • userscontrol_ini_setup
    • can_compress_scripts
    • userscontrol_pro_active
    • userscontrol_profile_nav
    • theysaidso_admin_options
    • userscontrol_options
    • widget_recent-posts
    • db_upgraded
    • userscontrol_profile_fields
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=userscontrol&tab=fields
    • > Warning in wp-content/plugins/users-control/admin/tabs/fields.php+45
    Invalid argument supplied for foreach()

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/users-control/templates/basic/directory_cards.php
    • > /wp-content/plugins/users-control/templates/basic/directory_2.php
    • > /wp-content/plugins/users-control/templates/basic/directory_default.php
  • 36× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/users-control/addons/pages/admin/admin.php on line 12
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/users-control/templates/basic/directory_cards.php on line 11
    • > PHP Notice
      Trying to get property 'profile' of non-object in wp-content/plugins/users-control/templates/basic/user_profile_v1.php on line 4
    • > PHP Notice
      Undefined variable: display_total_found in wp-content/plugins/users-control/templates/basic/directory_2.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_all() on null in wp-content/plugins/users-control/admin/tabs/fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function has_profile_bg() on null in wp-content/plugins/users-control/templates/basic/user_profile_v1.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'UserscontrolCommon' not found in wp-content/plugins/users-control/classes/usercontrol.messaging.php:2
    • > PHP Notice
      Undefined variable: users_list in wp-content/plugins/users-control/templates/basic/directory_cards.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'UserscontrolCommon' not found in wp-content/plugins/users-control/classes/usercontrol.admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/users-control/classes/usercontrol.order.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (DASHBOARD), #2 (ADMIN - SUBSCRIPTIONS), #3 (ADMIN - SUBSCRIPTIONS - DETAILS), #4 (ADMIN - SUBSCRIPTIONS - EDIT), #5 (ADMIN - ORDERS), #6 (MEMBER - DASHBOARD), #7 (MEMBER - MEMBERSHIP DETAILS), #8 (MEMBER - CUSTOM AVATAR), #9 (MEMBER - WOOCOMMERCE ORDERS), #10 (MEMBER - SUBSCRIPTION PLANS PURCHASE)
You can look at the official readme.txt

users-control/index.php 92% from 13 tests

The main PHP script in "UsersControl - Users Profile, Free or Paid Subscriptions, User Access Restriction & Members Directory" version 1.0.16 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("users-control.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin38,240 lines of code in 168 files:
LanguageFilesBlank linesComment linesLines of code
PHP607,50392915,136
JavaScript441,3571,1217,520
CSS151,8012387,142
SVG3003,158
Sass2350482,649
LESS2350642,635

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity124.38
▷ Minimum class complexity10.00
▷ Maximum class complexity457.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods408
▷ Static methods61.47%
▷ Public methods40499.02%
▷ Protected methods30.74%
▷ Private methods10.25%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
346 PNG files occupy 0.99MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/flags/24/GB.png0.61KB0.50KB▼ 18.05%
libs/flags/24/AD.png0.39KB0.40KB0.00%
libs/flags/24/_nato.png0.36KB0.38KB0.00%
admin/img/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
libs/flags/24/BD.png0.24KB0.26KB0.00%