90% login-as-users

Code Review | Login As Users

WordPress plugin Login As Users scored90%from 54 tests.

About plugin

  • Plugin page: login-as-users
  • Plugin version: 1.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2021
  • Latest release: Jun 12, 2023
  • Number of updates: 12
  • Update frequency: every 58.2 days
  • Top authors: rajkakadiya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,438 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 gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.92ms] Passed 4 tests

A check of server-side resources used by Login As Users
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.31 ▼4.07
Dashboard /wp-admin3.43 ▲0.1345.44 ▼17.10
Posts /wp-admin/edit.php3.54 ▲0.1944.20 ▼4.06
Add New Post /wp-admin/post-new.php6.01 ▲0.1393.83 ▼2.43
Media Library /wp-admin/upload.php3.35 ▲0.1334.81 ▲4.27

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
gwslau_loginas_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login As Users
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.99 ▼0.555.79 ▲4.0240.76 ▼3.03
Dashboard /wp-admin2,224 ▲335.88 ▼0.01106.98 ▼0.9039.87 ▼0.81
Posts /wp-admin/edit.php2,113 ▲242.02 ▼0.0337.84 ▼3.0634.65 ▲0.37
Add New Post /wp-admin/post-new.php1,546 ▲2923.03 ▲5.50612.65 ▼12.8156.09 ▲6.90
Media Library /wp-admin/upload.php1,403 ▲214.22 ▼0.0499.25 ▼5.2341.67 ▼2.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • gwslau_loginas_options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: fast user switching, users, switch user, user switching, user...

login-as-users/login-as-users.php 92% from 13 tests

The entry point to "Login As Users" version 1.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 detected897 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4568623
CSS2350245
JavaScript12028
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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