10% twg-members

Code Review | TheWebGears Members Plugin

WordPress plugin TheWebGears Members Plugin scored10%from 54 tests.

About plugin

  • Plugin page: twg-members
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.2-3.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2011
  • Latest release: Aug 23, 2013
  • Number of updates: 13
  • Update frequency: every 56.4 days
  • Top authors: beatmasta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,281 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/twg-members/index.php+95
    Undefined index: auth

Server metrics [RAM: ▼1.96MB] [CPU: ▼49.31ms] Passed 4 tests

An overview of server-side resources used by TheWebGears Members Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.11 ▼36.75
Dashboard /wp-admin2.05 ▼1.267.82 ▼41.37
Posts /wp-admin/edit.php2.05 ▼1.316.25 ▼36.33
Add New Post /wp-admin/post-new.php2.05 ▼3.845.13 ▼82.78
Media Library /wp-admin/upload.php2.05 ▼1.184.50 ▼26.58
TWG Members /wp-admin/options-general.php?page=twg-members2.055.87

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 16 new files
Database: 3 new tables, 7 new options
New tables
wp_twg_member_fields
wp_twg_members
wp_twg_memberfield_values
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
twg_memberopts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TheWebGears Members Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.21 ▼1.041.64 ▼0.2139.59 ▼3.62
Dashboard /wp-admin2,214 ▲235.91 ▲0.04107.84 ▼0.1238.10 ▼5.38
Posts /wp-admin/edit.php2,100 ▲82.01 ▲0.0141.07 ▲5.9832.50 ▲0.98
Add New Post /wp-admin/post-new.php1,522 ▼2123.21 ▲4.99631.05 ▲27.9057.13 ▲8.31
Media Library /wp-admin/upload.php1,393 ▲84.20 ▼0.1497.97 ▲1.0942.96 ▲0.88
TWG Members /wp-admin/options-general.php?page=twg-members1,2882.0725.6440.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/twg-members/index.php+95
    Undefined index: auth
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+95
    Undefined index: auth
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the twg-member-print-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: preserve_regvalues
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: label_user
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: label_pass
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: custom_loginform
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: uloggedin_msg
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: error_nouserpass
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: error_wronguser
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: error_wrongpass
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: label_user_reg
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: label_pass_reg
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: regex_for_uname
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: regex_for_passwd
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: error_useralreadyexists
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+497
    Undefined index: success_registered
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Notice in wp-content/plugins/twg-members/index.php+472
    Undefined index: page_on_tab

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/twg-members/index.php:50

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=twg-members
    • > Javascript (severe) in unknown
    /wp-content/plugins/twg-members/scripts.js?ver=6.3.1 8:39 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Registration fields configuration view), #2 (Login errors configuration view), #3 (Registration fields customization looks like this)
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

twg-members/index.php 92% from 13 tests

The main file in "TheWebGears Members Plugin" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("twg-members.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,579 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21447871
CSS2780477
JavaScript1280231

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity6.12
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods1869.23%
▷ Protected methods00.00%
▷ Private methods830.77%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/minus.png0.71KB0.55KB▼ 22.01%
images/edit.png0.69KB0.62KB▼ 9.54%
images/delete.png3.21KB0.54KB▼ 83.17%
images/plus.png0.45KB0.60KB0.00%
images/delete_disabled.png3.84KB0.33KB▼ 91.30%