68% jquery-drop-down-menu-plugin

Code Review | jQuery Dropdown Menu

WordPress plugin jQuery Dropdown Menu scored68%from 54 tests.

About plugin

  • Plugin page: jquery-drop-down-...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.8.3
  • WordPress version: 6.3.1
  • First release: Jan 1, 2010
  • Latest release: Dec 21, 2017
  • Number of updates: 112
  • Update frequency: every 26.0 days
  • Top authors: phpinterviewquestion.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /56,786 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.83MB] [CPU: ▼55.07ms] Passed 4 tests

This is a short check of server-side resources used by jQuery Dropdown Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.314.70 ▼36.59
Dashboard /wp-admin2.18 ▼1.136.20 ▼48.10
Posts /wp-admin/edit.php2.18 ▼1.186.36 ▼45.88
Add New Post /wp-admin/post-new.php2.18 ▼3.717.86 ▼89.72
Media Library /wp-admin/upload.php2.18 ▼1.056.71 ▼29.68
Dropdown Menu /wp-admin/options-general.php?page=jquery_drop_down_menu2.187.66

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 20 new options
New WordPress options
custom_menu_value
theysaidso_admin_options
fadeout
widget_theysaidso_widget
custom_menu_include
fadein1
depth
custom_menu
widget_recent-posts
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for jQuery Dropdown Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲10213.81 ▼0.548.95 ▲6.7040.24 ▼5.33
Dashboard /wp-admin2,202 ▲255.65 ▼0.0495.04 ▲3.6739.80 ▼1.78
Posts /wp-admin/edit.php2,113 ▲132.00 ▼0.0039.95 ▼0.9135.22 ▼1.98
Add New Post /wp-admin/post-new.php1,535 ▼1023.25 ▼0.08668.21 ▲23.0254.46 ▼3.64
Media Library /wp-admin/upload.php1,410 ▲104.22 ▲0.0398.98 ▼7.5641.62 ▼6.01
Dropdown Menu /wp-admin/options-general.php?page=jquery_drop_down_menu1,4111.7123.2438.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the down-menu-plugin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 20 options in the database
    • theysaidso_admin_options
    • pluginactive
    • sort_order
    • sort_by
    • fadein
    • home_link
    • db_upgraded
    • fadeout
    • can_compress_scripts
    • custom_menu
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the down-menu-plugin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+291
    Undefined index: effecttype
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+300
    Undefined index: speed
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+41
    Undefined index: mode
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+64
    Undefined index: jddm_location_enabled
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+76
    Undefined index: jddm_location
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+105
    Undefined index: menutupe
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+312
    Undefined index: jddm_delay
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+327
    Undefined index: sorting
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+335
    Undefined index: sortingorder
    • > GET request to /wp-admin/options-general.php?page=jquery_drop_down_menu
    • > Notice in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php+368
    Undefined index: customcss

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/jquery-drop-down-menu-plugin/jddm_adminpage.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (A preview of Black Style Menu), #2 (A preview of Blue Style Menu), #3 (Dropdown menu options page.)
The official readme.txt might help

jquery-drop-down-menu-plugin/jquery-drop-down-menu.php 85% from 13 tests

The primary PHP file in "jQuery Dropdown Menu" version 3.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("jquery-drop-down-menu-plugin.php" instead of "jquery-drop-down-menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected5,378 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS13378301,383
PHP31,7366601,158
JavaScript34724166

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods35
▷ Static methods925.71%
▷ Public methods3394.29%
▷ Protected methods25.71%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants218.18%
▷ Class constants981.82%
▷ Public constants9100.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
There are no PNG files in this plugin