90% drag-drop-menu-items

Code Review | Drag & Drop Menu Items

WordPress plugin Drag & Drop Menu Items scored90%from 54 tests.

About plugin

  • Plugin page: drag-drop-menu-items
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: May 4, 2020
  • Latest release: Aug 27, 2023
  • Number of updates: 8
  • Update frequency: every 151.3 days
  • Top authors: sajjad67 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,290 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
Install script ran successfully

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

A check of server-side resources used by Drag & Drop Menu Items
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.95 ▼1.11
Dashboard /wp-admin3.32 ▲0.0144.22 ▼1.07
Posts /wp-admin/edit.php3.37 ▲0.0144.42 ▼6.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.77 ▼17.01
Media Library /wp-admin/upload.php3.24 ▲0.0138.11 ▲5.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Drag & Drop Menu Items
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.66 ▼0.741.92 ▲0.0344.04 ▲3.75
Dashboard /wp-admin2,203 ▲154.81 ▼1.10108.30 ▲1.1438.24 ▼6.09
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0634.43 ▼8.0532.40 ▼3.30
Add New Post /wp-admin/post-new.php1,533 ▼123.42 ▲0.34655.92 ▼5.5363.67 ▲4.50
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.1197.06 ▼20.0846.87 ▼1.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: nav-menu-items-edit, drag-and-drop, wp-nav-menus, nav-menu-items, add-menu-items

drag-drop-menu-items/drag-drop-menu-items.php Passed 13 tests

The main PHP file in "Drag & Drop Menu Items" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
63 characters long description:
Easily Add Nav Menu Item By Dragging It To Menu Lists Container

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin103 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript129880
PHP181423

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin