78% user-session-synchronizer

Code Review | User Session Synchronizer

WordPress plugin User Session Synchronizer scored78%from 54 tests.

About plugin

  • Plugin page: user-session-sync...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Sep 8, 2016
  • Latest release: Jun 29, 2023
  • Number of updates: 45
  • Update frequency: every 55.2 days
  • Top authors: rafasashi (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

200+ active /6,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼2.26ms] Passed 4 tests

Server-side resources used by User Session Synchronizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3244.76 ▲1.06
Dashboard /wp-admin3.69 ▲0.3954.69 ▼2.27
Posts /wp-admin/edit.php3.75 ▲0.3952.76 ▼0.03
Add New Post /wp-admin/post-new.php6.23 ▲0.3585.83 ▼7.79
Media Library /wp-admin/upload.php3.56 ▲0.3341.04 ▲4.35
User Session Sync /wp-admin/admin.php?page=user-session-synchronizer3.5236.13
User Sessions /wp-admin/admin.php?page=session_control3.5137.21
Email Template /wp-admin/admin.php?page=view_email_setting3.5945.79
User Verify /wp-admin/admin.php?page=view_email_verification3.5237.08

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
user-session-synchronizer_version
ussync-email-header
ussync_email_confemail
theysaidso_admin_options
ussync_email_conf_title
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Session Synchronizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲21414.07 ▼0.289.42 ▲7.5943.03 ▼4.89
Dashboard /wp-admin2,246 ▲675.18 ▼0.70106.81 ▼12.6137.95 ▼7.59
Posts /wp-admin/edit.php2,132 ▲432.22 ▲0.2339.50 ▲3.8930.31 ▼4.26
Add New Post /wp-admin/post-new.php1,546 ▲1323.37 ▲0.42676.61 ▲5.1175.48 ▲22.38
Media Library /wp-admin/upload.php1,425 ▲374.40 ▲0.1599.96 ▼3.3838.50 ▼6.86
User Session Sync /wp-admin/admin.php?page=user-session-synchronizer8821.8931.7625.26
User Sessions /wp-admin/admin.php?page=session_control1,1251.8825.4627.66
Email Template /wp-admin/admin.php?page=view_email_setting1,6097.08143.3175.15
User Verify /wp-admin/admin.php?page=view_email_verification8721.9122.9123.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • ussync-email-header
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ussync_email_conf_title
    • ussync_email_confemail
    • user-session-synchronizer_version
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=session_control
    • > Notice in wp-content/plugins/user-session-synchronizer/includes/class-user-session-synchronizer-session-control.php+250
    Undefined index: name

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/user-session-synchronizer/includes/views/email-verification.php:64

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: cookie, synchronizer, session, user

user-session-synchronizer/user-session-synchronizer.php Passed 13 tests

"User Session Synchronizer" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
100 characters long description:
Keep the user logged in from one wordpress to another by synchronizing user data and cookie session.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,696 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP126026921,499
Markdown139082
JavaScript416654
CSS131741
HTML10020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity33.71
▷ Minimum class complexity5.00
▷ Maximum class complexity67.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods77
▷ Static methods45.19%
▷ Public methods6888.31%
▷ Protected methods00.00%
▷ Private methods911.69%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 0.52MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/send.png3.92KB2.86KB▼ 27.17%
includes/images/menu.png1.07KB0.78KB▼ 27.36%
includes/images/wrong_arrow.png3.68KB2.57KB▼ 30.26%
screenshot_1.png69.21KB26.82KB▼ 61.25%
screenshot_2.png154.12KB25.51KB▼ 83.45%