74% multisite-shared-menu

Code Review | Multisite Shared Menu

WordPress plugin Multisite Shared Menu scored 74% from 54 tests.

About plugin

  • Plugin page: multisite-shared-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jul 8, 2015
  • Number of updates: 10
  • Update frequency: every 18.1 days
  • Top authors: ben.greeley (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 6,903 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.55ms] Passed 4 tests

An overview of server-side resources used by Multisite Shared Menu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.15 ▼4.98
Dashboard /wp-admin3.32 ▲0.0245.41 ▼3.37
Posts /wp-admin/edit.php3.37 ▲0.0146.35 ▲2.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.56 ▼1.38
Media Library /wp-admin/upload.php3.24 ▲0.0135.91 ▼0.45

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Multisite Shared Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.65 ▼0.805.17 ▲3.0939.70 ▼14.70
Dashboard /wp-admin2,206 ▲205.87 ▼0.15104.14 ▼7.4337.59 ▼1.68
Posts /wp-admin/edit.php2,068 ▼02.02 ▼0.0435.34 ▼0.6233.56 ▲2.34
Add New Post /wp-admin/post-new.php1,521 ▼323.00 ▼0.39635.53 ▼53.9761.13 ▲4.54
Media Library /wp-admin/upload.php1,385 ▼64.22 ▲0.07101.00 ▼7.4144.80 ▲1.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/multisite-shared-menu/inc/class-menufromsite-deactivator.php+8
    Non-static method MasterSharedMenu_Deactivator::unregister_pluginfields() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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 following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-shared-menu/admin/class-menufromsite-admin-options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/multisite-shared-menu/views/options-page.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
3 plugin tags: navigation, multisite, menus

multisite-shared-menu/multisitesharedmenu.php 85% from 13 tests

This is the main PHP file of "Multisite Shared Menu" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("multisite-shared-menu.php" instead of "multisitesharedmenu.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 255 characters long)

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
Good job! No executable or dangerous file extensions detected187 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP67440187

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.25
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected