84% user-groups-restrictions

Code Review | User Groups Restrictions

WordPress plugin User Groups Restrictions scored84%from 54 tests.

About plugin

  • Plugin page: user-groups-restr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 23, 2013
  • Latest release: Jun 23, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: asadowski10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,931 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.48ms] Passed 4 tests

A check of server-side resources used by User Groups Restrictions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.88 ▼1.59
Dashboard /wp-admin3.35 ▲0.0150.73 ▼14.77
Posts /wp-admin/edit.php3.41 ▲0.0546.35 ▼5.16
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.08 ▼8.01
Media Library /wp-admin/upload.php3.28 ▲0.0438.86 ▼1.96

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by User Groups Restrictions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.80 ▲0.221.95 ▲0.2842.09 ▲1.16
Dashboard /wp-admin2,206 ▲155.91 ▲0.0599.90 ▼6.3045.32 ▲8.32
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0333.52 ▼5.5338.11 ▲3.60
Add New Post /wp-admin/post-new.php1,514 ▼1717.39 ▼0.96653.84 ▲32.1147.88 ▼11.13
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.02106.97 ▲5.2245.68 ▲0.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/user-groups-restrictions/user-groups-restrictions.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The main file in "User Groups Restrictions" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
122 characters long description:
Extend of user-groups plugin, this plugin allows you to restrict access to users groups in back-end and front-end on page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin281 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35491231
PO File14928
Markdown111022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity22.00
▷ Minimum class complexity20.00
▷ Maximum class complexity24.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods777.78%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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