90% wp-user-groups

Code Review | WP User Groups

WordPress plugin WP User Groups scored90%from 54 tests.

About plugin

  • Plugin page: wp-user-groups
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2015
  • Latest release: Mar 23, 2021
  • Number of updates: 26
  • Update frequency: every 78.4 days
  • Top authors: johnjamesjacoby (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /27,152 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.23MB] [CPU: ▼2.64ms] Passed 4 tests

Analyzing server-side resources used by WP User Groups
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2343.90 ▲1.57
Dashboard /wp-admin3.54 ▲0.2450.30 ▼4.44
Posts /wp-admin/edit.php3.65 ▲0.3054.23 ▼2.89
Add New Post /wp-admin/post-new.php6.12 ▲0.2392.58 ▼4.79
Media Library /wp-admin/upload.php3.46 ▲0.2338.75 ▲3.77
Types /wp-admin/edit-tags.php?taxonomy=user-type3.4639.27
Groups /wp-admin/edit-tags.php?taxonomy=user-group3.4639.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP User Groups
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.70 ▲0.091.71 ▼0.0644.20 ▼1.58
Dashboard /wp-admin2,208 ▲285.61 ▲0.0191.34 ▼3.9943.66 ▲1.43
Posts /wp-admin/edit.php2,116 ▲132.01 ▲0.0636.92 ▼2.6335.26 ▼2.61
Add New Post /wp-admin/post-new.php1,537 ▲1023.40 ▲0.26642.84 ▲41.5159.96 ▲11.61
Media Library /wp-admin/upload.php1,410 ▲134.17 ▼0.0696.37 ▼10.1344.45 ▲0.05
Types /wp-admin/edit-tags.php?taxonomy=user-type1,2702.1126.1230.47
Groups /wp-admin/edit-tags.php?taxonomy=user-group1,2642.1226.0829.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Please fix the following attributes: The official readme.txt is a good inspiration

wp-user-groups/wp-user-groups.php Passed 13 tests

Analyzing the main PHP file in "WP User Groups" version 2.5.0
45 characters long description:
Group users together with taxonomies & terms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin823 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6263646700
CSS1200123

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity84.00
▷ Minimum class complexity84.00
▷ Maximum class complexity84.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods2668.42%
▷ Protected methods718.42%
▷ Private methods513.16%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin