94% multisite-dashboard-switcher

Code Review | Multisite Dashboard Switcher

WordPress plugin Multisite Dashboard Switcher scored 94% from 54 tests.

About plugin

  • Plugin page: multisite-dashboa...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.8
  • WordPress version: 5.8.1
  • First release: Nov 2, 2011
  • Latest release: Jul 12, 2021
  • Number of updates: 31
  • Update frequency: every 114.2 days
  • Top authors: sjlevy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 5,624 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼143.13ms] Passed 4 tests

This is a short check of server-side resources used by Multisite Dashboard Switcher
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1534.74 ▲14.87
Dashboard /wp-admin3.09 ▲0.0343.48 ▼2.82
Posts /wp-admin/edit.php3.17 ▲0.0748.07 ▲3.22
Add New Post /wp-admin/post-new.php5.45 ▲0.02108.16 ▼570.05
Media Library /wp-admin/upload.php3.03 ▲0.0237.40 ▼2.86

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Multisite Dashboard Switcher
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.92 ▲0.4611.01 ▲1.5349.69 ▼2.91
Dashboard /wp-admin2,989 ▲585.99 ▼0.05152.41 ▼4.37111.84 ▲2.29
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0077.17 ▲9.18127.97 ▲41.72
Add New Post /wp-admin/post-new.php1,683 ▼20616.21 ▼0.20394.50 ▼38.67115.59 ▲0.78
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.02152.62 ▼1.03116.67 ▼5.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-dashboard-switcher/multisite-dashboard-switcher.php:26

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 important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: switch, multisite, network, switcher

multisite-dashboard-switcher/multisite-dashboard-switcher.php Passed 13 tests

The entry point to "Multisite Dashboard Switcher" version 1.5 is a PHP file that has certain tags in its header comment area
77 characters long description:
Adds a menu to the admin bar for easy switching between multisite dashboards.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1192891

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected