90% shared-user-table-roles

Code Review | Shared User Table Roles

WordPress plugin Shared User Table Roles scored90%from 54 tests.

About plugin

  • Plugin page: shared-user-table...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: May 6, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: wp_joris (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,424 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.01MB] [CPU: ▼3.93ms] Passed 4 tests

A check of server-side resources used by Shared User Table Roles
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0238.84 ▼2.81
Dashboard /wp-admin3.32 ▲0.0248.03 ▼2.12
Posts /wp-admin/edit.php3.37 ▲0.0145.53 ▲1.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.87 ▼8.93
Media Library /wp-admin/upload.php3.24 ▲0.0134.18 ▼1.87

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Shared User Table Roles: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.201.83 ▼0.0243.41 ▼0.62
Dashboard /wp-admin2,206 ▲185.79 ▲0.9396.87 ▼16.6735.89 ▼13.25
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0233.24 ▼4.1833.66 ▼1.57
Add New Post /wp-admin/post-new.php1,541 ▼118.41 ▼0.21617.84 ▲9.7556.30 ▲5.69
Media Library /wp-admin/upload.php1,388 ▼04.33 ▲0.1396.32 ▲0.6741.66 ▼5.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: meta, wp-config, users, database, plugin...

shared-user-table-roles/shared-user-table-roles.php Passed 13 tests

The main file in "Shared User Table Roles" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
76 characters long description:
Share user roles when sharing the user table between multiple installations.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin93 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1231293

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin