83% user-groups

Code Review | User Groups

WordPress plugin User Groups scored83%from 54 tests.

About plugin

  • Plugin page: user-groups
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.5
  • WordPress version: 6.3.1
  • First release: Jun 29, 2012
  • Latest release: Apr 12, 2016
  • Number of updates: 12
  • Update frequency: every 115.3 days
  • Top authors: katzwebdesign (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /19,854 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.88ms] Passed 4 tests

An overview of server-side resources used by User Groups
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1640.47 ▼2.84
Dashboard /wp-admin3.45 ▲0.1548.39 ▼4.34
Posts /wp-admin/edit.php3.57 ▲0.2147.26 ▲0.89
Add New Post /wp-admin/post-new.php6.04 ▲0.1583.07 ▼12.73
Media Library /wp-admin/upload.php3.38 ▲0.1534.72 ▼3.61
User Groups /wp-admin/edit-tags.php?taxonomy=user-group3.3736.25

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Groups
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.071.65 ▲0.0343.68 ▲0.11
Dashboard /wp-admin2,196 ▲165.51 ▼0.1483.69 ▼15.3838.14 ▼7.75
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0331.89 ▼3.7932.14 ▼4.45
Add New Post /wp-admin/post-new.php1,531 ▼422.98 ▲4.87683.00 ▲37.1751.94 ▼12.27
Media Library /wp-admin/upload.php1,404 ▲74.23 ▼0.03103.02 ▼13.8345.37 ▼0.45
User Groups /wp-admin/edit-tags.php?taxonomy=user-group1,2772.2940.5831.53

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-groups/user-groups.php:12

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 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The User Groups screen is just like the Categories screen, but with a color selector!), #2 (View all users in a group, as well as the group description), #3 (Edit the Group once it is created), #4 (How the user groups look in the User Profile screen)
You can take inspiration from this readme.txt

user-groups/user-groups.php 85% from 13 tests

The principal PHP file in "User Groups" v. 1.3.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

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
No dangerous file extensions were detected611 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP115738611

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.39
Average class complexity92.00
▷ Minimum class complexity92.00
▷ Maximum class complexity92.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods32
▷ Static methods618.75%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin