84% dropdown-multisite-selector

Code Review | Dropdown Multisite selector

WordPress plugin Dropdown Multisite selector scored84%from 54 tests.

About plugin

  • Plugin page: dropdown-multisit...
  • Plugin version: 0.9.2
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.0
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Apr 4, 2023
  • Number of updates: 40
  • Update frequency: every 84.2 days
  • Top authors: alordiel (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

1,000+ active /24,901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Dropdown Multisite selector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1142.93 ▲0.62
Dashboard /wp-admin3.43 ▲0.0452.49 ▼14.96
Posts /wp-admin/edit.php3.54 ▲0.1448.44 ▼3.27
Add New Post /wp-admin/post-new.php6.01 ▲0.0887.19 ▼15.66
Media Library /wp-admin/upload.php3.35 ▲0.0842.31 ▲2.25
Dropdown Multisite /wp-admin/options-general.php?page=dropdown-multisite-selector3.3737.59

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
dms_sorting
widget_dms_widget
theysaidso_admin_options
db_upgraded
dms_multisite
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
dms_placeholder

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dropdown Multisite selector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.69 ▼0.668.14 ▲6.4242.92 ▼1.62
Dashboard /wp-admin2,199 ▲255.56 ▲0.0490.77 ▼21.1839.80 ▼2.92
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0235.82 ▲1.0533.49 ▼0.78
Add New Post /wp-admin/post-new.php1,529 ▲323.35 ▼0.17702.84 ▲91.6956.63 ▲5.45
Media Library /wp-admin/upload.php1,407 ▲104.16 ▼0.03103.66 ▲0.0544.70 ▼0.66
Dropdown Multisite /wp-admin/options-general.php?page=dropdown-multisite-selector1,0221.6723.9033.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • dms_multisite
    • dms_placeholder
    • widget_theysaidso_widget
    • dms_sorting
    • widget_recent-posts
    • widget_dms_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dropdown-multisite-selector/functions/widgets.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/dropdown-multisite-selector/templates/dms-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dropdown-multisite-selector/functions/wordpress.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dropdown-multisite-selector/functions/shortcodes.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dropdown-multisite-selector/functions/ajax.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #2 (The front end - widget area + shortcode in post) image required
You can look at the official readme.txt

dropdown-multisite-selector/dropdown-multisite-selector.php Passed 13 tests

The primary PHP file in "Dropdown Multisite selector" version 0.9.2 is used by WordPress to initiate all plugin functionality
77 characters long description:
Allows you to configure a select option of redirecting to different webpages.

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
Everything looks great! No dangerous files found in this plugin811 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP815696580
JavaScript24419141
CSS214090

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.00%
Constants2
▷ Global constants2100.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