84% login-as-user

Code Review | Login as User

WordPress plugin Login as User scored84%from 54 tests.

About plugin

  • Plugin page: login-as-user
  • Plugin version: 1.4.8
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2019
  • Latest release: Oct 23, 2023
  • Number of updates: 38
  • Update frequency: every 41.2 days
  • Top authors: Yiannistaos (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

20,000+ active /153,714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.80ms] Passed 4 tests

A check of server-side resources used by Login as User
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.98 ▲2.06
Dashboard /wp-admin3.37 ▲0.0749.29 ▼1.52
Posts /wp-admin/edit.php3.42 ▲0.0643.94 ▼4.08
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.26 ▼15.67
Media Library /wp-admin/upload.php3.29 ▲0.0635.62 ▲3.72
Login as User /wp-admin/options-general.php?page=login-as-user3.3232.61

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

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

Browser metrics Passed 4 tests

Login as User: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.40 ▲0.002.01 ▲0.4443.14 ▲2.11
Dashboard /wp-admin2,206 ▲295.63 ▲0.0493.26 ▲9.3942.72 ▼0.26
Posts /wp-admin/edit.php2,111 ▲112.06 ▲0.0334.34 ▼6.6533.79 ▼7.48
Add New Post /wp-admin/post-new.php1,536 ▲1023.21 ▼0.38633.46 ▼31.6558.04 ▼8.23
Media Library /wp-admin/upload.php1,411 ▲144.36 ▲0.1895.53 ▼3.2342.12 ▼0.44
Login as User /wp-admin/options-general.php?page=login-as-user1,1722.1923.7732.18

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 20× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Vcs_Api' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/Vcs/GitLabApi.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Theme_UpdateChecker' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/Vcs/ThemeUpdateChecker.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_DebugBar_Panel' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/DebugBar/ThemePanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_DebugBar_Panel' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/DebugBar/PluginPanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_UpdateChecker' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/Theme/UpdateChecker.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Metadata' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/Update.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_DebugBar_Extension' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/DebugBar/PluginExtension.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/login-as-user/includes/class-w357-login-as-user.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Update' not found in wp-content/plugins/login-as-user/includes/plugin-update-checker/Puc/v4p6/Theme/Update.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/login-as-user/uninstall.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: user, web357, login as user, admin, login

login-as-user/login-as-user.php Passed 13 tests

This is the main PHP file of "Login as User" version 1.4.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
104 characters long description:
Login as User is a free WordPress plugin that helps admins switch user accounts instantly to check data.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected8,081 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP521,8103,0096,877
PO File14133157586
Markdown1720217
CSS54825205
JavaScript52733125
JSON38071

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.40
Average class complexity22.46
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes45
▷ Abstract classes511.11%
▷ Concrete classes4088.89%
▷ Final classes00.00%
Methods476
▷ Static methods367.56%
▷ Public methods30263.45%
▷ Protected methods15732.98%
▷ Private methods173.57%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/login-as-user-wordpress-plugin-120x200.png45.81KB9.64KB▼ 78.95%
admin/img/web357-logo.png7.12KB2.83KB▼ 60.18%
admin/img/x.png0.58KB0.65KB0.00%
admin/img/tick.png0.52KB0.58KB0.00%