89% wp-switch-user

Code Review | Wp Switch User

WordPress plugin Wp Switch User scored89%from 54 tests.

About plugin

  • Plugin page: wp-switch-user
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Mar 5, 2019
  • Latest release: Jul 1, 2022
  • Number of updates: 3
  • Update frequency: every 405.7 days
  • Top authors: acewebx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,234 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.38ms] Passed 4 tests

An overview of server-side resources used by Wp Switch User
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0833.86 ▼4.05
Dashboard /wp-admin3.37 ▲0.0742.90 ▼3.76
Posts /wp-admin/edit.php3.49 ▲0.1344.47 ▼1.33
Add New Post /wp-admin/post-new.php5.97 ▲0.0975.46 ▼8.37
Media Library /wp-admin/upload.php3.30 ▲0.0737.98 ▲2.71

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Wp Switch User
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲14113.71 ▼0.875.39 ▲3.5237.00 ▼3.95
Dashboard /wp-admin2,210 ▲224.84 ▼0.06117.02 ▲10.8742.82 ▲4.08
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0340.50 ▼4.2034.30 ▼1.54
Add New Post /wp-admin/post-new.php1,522 ▼023.11 ▼0.05650.73 ▲26.7753.34 ▲1.74
Media Library /wp-admin/upload.php1,386 ▼24.19 ▼0.0195.17 ▼0.2040.80 ▼3.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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: directly open users account, user management, switch, instant user switch, switch user...

wp-switch-user/ace-wp-switch-user.php 85% from 13 tests

The main PHP file in "Wp Switch User" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-switch-user.php" instead of "ace-wp-switch-user.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected303 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12126535285
CSS21812
JavaScript24546

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.14
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin