84% multisite-user-role-sync

Code Review | Multisite User Role Sync

WordPress plugin Multisite User Role Sync scored84%from 54 tests.

About plugin

  • Plugin page: multisite-user-ro...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: Sep 1, 2016
  • Latest release: Sep 1, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: shawnxlw (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,087 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: ▼5.78ms] Passed 4 tests

Analyzing server-side resources used by Multisite User Role Sync
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.22 ▼10.72
Dashboard /wp-admin3.34 ▲0.0359.04 ▲5.25
Posts /wp-admin/edit.php3.39 ▲0.0348.19 ▼1.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.78 ▼4.88
Media Library /wp-admin/upload.php3.26 ▲0.0336.07 ▼5.66

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Multisite User Role Sync
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.75 ▲0.151.91 ▼0.0144.98 ▲7.29
Dashboard /wp-admin2,198 ▲335.61 ▼0.0284.85 ▼27.5140.46 ▼18.52
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.1138.25 ▲1.8334.13 ▼1.62
Add New Post /wp-admin/post-new.php1,542 ▲1623.10 ▲5.42656.96 ▼16.7558.34 ▲0.84
Media Library /wp-admin/upload.php1,397 ▼64.34 ▲0.10103.79 ▼11.6742.93 ▼4.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-user-role-sync/multisite-user-role-sync.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (![Plugin settings page](screenshot-1.png)) image missing
You can take inspiration from this readme.txt

multisite-user-role-sync/multisite-user-role-sync.php 92% from 13 tests

This is the main PHP file of "Multisite User Role Sync" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 191 characters long)

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 detected163 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13336163

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.25MB with 0.18MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png255.26KB75.85KB▼ 70.29%