90% td-multiple-roles

Code Review | TD Multiple Roles

WordPress plugin TD Multiple Roles scored90%from 54 tests.

About plugin

  • Plugin page: td-multiple-roles
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2022
  • Latest release: Sep 2, 2023
  • Number of updates: 3
  • Update frequency: every 144.7 days
  • Top authors: tdsupport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /646 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
Installer ran successfully

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

This is a short check of server-side resources used by TD Multiple Roles
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.54 ▼4.15
Dashboard /wp-admin3.33 ▲0.0345.22 ▼2.67
Posts /wp-admin/edit.php3.38 ▲0.0348.21 ▼2.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.76 ▼23.96
Media Library /wp-admin/upload.php3.25 ▲0.0336.06 ▲3.78

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by TD Multiple Roles
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.67 ▼0.111.86 ▲0.1538.00 ▼6.42
Dashboard /wp-admin2,209 ▲215.91 ▲1.0095.08 ▼7.2540.42 ▼2.61
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0535.72 ▼5.3536.63 ▲0.12
Add New Post /wp-admin/post-new.php1,514 ▼617.53 ▼5.49654.75 ▲52.2858.63 ▲4.58
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.05101.01 ▼0.7244.38 ▼1.73

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: user roles, roles, user, users, role

td-multiple-roles/td-multiple-roles.php Passed 13 tests

The principal PHP file in "TD Multiple Roles" v. 1.1 is loaded by WordPress automatically on each request
89 characters long description:
This TD Multiple Roles plugin allows you to assign multiple user roles to a user profile.

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
There were no executable files found in this plugin113 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3331297
CSS13411
JavaScript1205

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.42
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected