10% custom-menu-fields

Code Review | Custom Menu Fields

WordPress plugin Custom Menu Fields scored10%from 54 tests.

About plugin

  • Plugin page: custom-menu-fields
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Sep 20, 2021
  • Number of updates: 15
  • Update frequency: every 186.1 days
  • Top authors: diddledan (86.67%)diddledani (20%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,404 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/custom-menu-fields/custom-menu-fields.php+64
    Declaration of bh_Walker_Nav_Menu_Edit_Fields::start_lvl(&$output) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL)

Server metrics [RAM: ▼1.97MB] [CPU: ▼52.62ms] Passed 4 tests

An overview of server-side resources used by Custom Menu Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.54 ▼32.47
Dashboard /wp-admin2.05 ▼1.305.07 ▼53.45
Posts /wp-admin/edit.php2.05 ▼1.315.10 ▼41.42
Add New Post /wp-admin/post-new.php2.05 ▼3.845.35 ▼83.14
Media Library /wp-admin/upload.php2.05 ▼1.185.54 ▼27.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom Menu Fields
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.65 ▼0.731.85 ▲0.1344.11 ▲4.06
Dashboard /wp-admin2,209 ▲215.86 ▲0.9693.54 ▼11.3637.60 ▼7.46
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0239.68 ▲1.8434.69 ▼0.27
Add New Post /wp-admin/post-new.php1,535 ▲1523.11 ▲0.11666.19 ▲16.2559.65 ▲7.09
Media Library /wp-admin/upload.php1,388 ▼34.25 ▲0.08104.51 ▲5.3046.45 ▲4.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/custom-menu-fields/custom-menu-fields.php+64
    Declaration of bh_Walker_Nav_Menu_Edit_Fields::start_lvl(&$output) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-menu-fields/custom-menu-fields.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: fields, api, field, menu

custom-menu-fields/custom-menu-fields.php Passed 13 tests

Analyzing the main PHP file in "Custom Menu Fields" version 0.2
38 characters long description:
Adds custom fields to the menu editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin247 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12419247

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity9.33
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected