83% navigation-menu-as-dropdown-widget

Code Review | Navigation menu as dropdown Widget

WordPress plugin Navigation menu as dropdown Widget scored83%from 54 tests.

About plugin

  • Plugin page: navigation-menu-a...
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: May 3, 2020
  • Latest release: Sep 23, 2023
  • Number of updates: 22
  • Update frequency: every 56.4 days
  • Top authors: jeroenpeters1986 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /20,258 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Navigation menu as dropdown Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.31 ▼3.10
Dashboard /wp-admin3.35 ▲0.0546.46 ▼0.48
Posts /wp-admin/edit.php3.41 ▲0.0441.96 ▼4.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0479.78 ▼2.14
Media Library /wp-admin/upload.php3.28 ▲0.0434.80 ▼2.65

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_jp_dropdown_menu_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Navigation menu as dropdown Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▲0.012.03 ▲0.0944.27 ▲2.92
Dashboard /wp-admin2,198 ▲245.59 ▼0.0194.90 ▲7.5741.88 ▲1.39
Posts /wp-admin/edit.php2,100 ▲31.98 ▼0.0335.21 ▼2.0833.25 ▼4.02
Add New Post /wp-admin/post-new.php1,526 ▼223.27 ▲0.23642.48 ▲10.8051.54 ▼3.24
Media Library /wp-admin/upload.php1,400 ▲34.18 ▲0.0197.96 ▼4.1140.82 ▼3.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_jp_dropdown_menu_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/navigation-menu-as-dropdown-widget/navigation-menu-as-dropdown-widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === navigation-menu-as-dropdown-widget === )
Please take inspiration from this readme.txt

navigation-menu-as-dropdown-widget/navigation-menu-as-dropdown-widget.php 85% from 13 tests

The main file in "Navigation menu as dropdown Widget" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)
  • Domain Path: The domain path folder was not found ("/translation")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin199 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13922199

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity8.75
▷ Minimum method complexity1.00
▷ Maximum method complexity27.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%
Functions1
▷ Named functions1100.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 images were found in this plugin