83% menus-multisite-picker

Code Review | Plugin Name: Menus Multisite Picker

WordPress plugin Plugin Name: Menus Multisite Pickerscored83%from 54 tests.

About plugin

  • Plugin page: menus-multisite-p...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2016
  • Latest release: Mar 15, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: tungvn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /681 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.02MB] [CPU: ▼9.29ms] Passed 4 tests

Server-side resources used by Plugin Name: Menus Multisite Picker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.21 ▼3.31
Dashboard /wp-admin3.33 ▼0.0144.06 ▼16.93
Posts /wp-admin/edit.php3.38 ▲0.0347.80 ▲8.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.95 ▼13.37
Media Library /wp-admin/upload.php3.26 ▲0.0333.86 ▼3.54

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin Name: Menus Multisite Picker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.24 ▼1.161.73 ▼0.3539.32 ▼4.24
Dashboard /wp-admin2,203 ▲155.79 ▲0.94110.14 ▼12.7741.30 ▼2.27
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0139.00 ▼1.2135.19 ▼1.33
Add New Post /wp-admin/post-new.php1,522 ▼1123.25 ▼0.03621.56 ▼5.9053.52 ▲8.91
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0394.96 ▼10.4140.53 ▼3.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
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/menus-multisite-picker/nav-multisite.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is missing
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: Menus Multisite Picker=== )
You can look at the official readme.txt

menus-multisite-picker/nav-multisite.php 85% from 13 tests

The primary PHP file in "Plugin Name: Menus Multisite Picker" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("menus-multisite-picker.php" instead of "nav-multisite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin222 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12716222

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions3
▷ Named functions3100.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