80% groups

Code Review | Groups

WordPress plugin Groups scored80%from 54 tests.

About plugin

  • Plugin page: groups
  • Plugin version: 2.18.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2012
  • Latest release: Feb 8, 2023
  • Number of updates: 317
  • Update frequency: every 12.9 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

354 reviews

Install metrics

20,000+ active /789,482 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.70MB] [CPU: ▲17.00ms] Passed 4 tests

Analyzing server-side resources used by Groups
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.51 ▲1.0448.25 ▲10.48
Dashboard /wp-admin5.24 ▲1.8981.85 ▲25.30
Posts /wp-admin/edit.php5.37 ▲2.0170.20 ▲21.57
Add New Post /wp-admin/post-new.php7.87 ▲1.98115.34 ▲18.04
Media Library /wp-admin/upload.php5.11 ▲1.8750.98 ▲17.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 138 new files
Database: 5 new tables, 7 new options
New tables
wp_groups_group_capability
wp_groups_user_group
wp_groups_group
wp_groups_user_capability
wp_groups_capability
New WordPress options
can_compress_scripts
db_upgraded
groups_plugin_version
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Groups
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,611 ▼1,15010.29 ▼4.271.59 ▼0.0243.36 ▲1.89
Dashboard /wp-admin2,237 ▲575.59 ▼0.0287.13 ▼1.3341.44 ▲1.34
Posts /wp-admin/edit.php2,303 ▲2002.52 ▲0.5249.92 ▲14.0135.38 ▼2.50
Add New Post /wp-admin/post-new.php6,527 ▲4,99927.97 ▲4.89858.87 ▲175.5638.14 ▼18.52
Media Library /wp-admin/upload.php1,451 ▲544.27 ▲0.1793.59 ▼21.6343.75 ▼3.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_groups_user_group
    • wp_groups_group
    • wp_groups_user_capability
    • wp_groups_capability
    • wp_groups_group_capability
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • groups_plugin_version
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
You can look at the official readme.txt

groups/groups.php Passed 13 tests

"Groups" version 2.18.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
108 characters long description:
Groups provides group-based user membership management, group-based capabilities and content access control.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin27,553 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PO File133,8135,87512,711
PHP521,3693,9819,592
JavaScript74861,0522,758
CSS12251992,348
Sass3120108
JSON10021
SVG30015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity41.66
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity5.84
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes00.00%
Methods296
▷ Static methods27693.24%
▷ Public methods27994.26%
▷ Protected methods00.00%
▷ Private methods175.74%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants117
▷ Global constants4437.61%
▷ Class constants7362.39%
▷ Public constants73100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
27 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/remove.png0.22KB0.16KB▼ 26.46%
images/add-ons/groups-gravity-forms.png4.26KB2.39KB▼ 43.85%
images/add-ons/affiliates-enterprise.png5.92KB3.07KB▼ 48.24%
images/add-ons/woocommerce-groups-newsletters.png5.02KB2.66KB▼ 47.00%
images/add-ons/groups-forums.png3.96KB2.26KB▼ 42.77%