10% sweet-custom-menu

Code Review | Sweet Custom Menu

WordPress plugin Sweet Custom Menu scored10%from 54 tests.

About plugin

  • Plugin page: sweet-custom-menu
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Nov 20, 2012
  • Latest release: Dec 21, 2012
  • Number of updates: 4
  • Update frequency: every 7.8 days
  • Top authors: corsonr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /10,349 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/sweet-custom-menu/edit_custom_walker.php+18
    Declaration of Walker_Nav_Menu_Edit_Custom::start_lvl(&$output) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL)

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.56ms] Passed 4 tests

A check of server-side resources used by Sweet Custom Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.45 ▼39.72
Dashboard /wp-admin2.05 ▼1.266.73 ▼43.04
Posts /wp-admin/edit.php2.05 ▼1.315.72 ▼42.98
Add New Post /wp-admin/post-new.php2.05 ▼3.845.14 ▼88.49
Media Library /wp-admin/upload.php2.05 ▼1.185.47 ▼30.93

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Sweet Custom Menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.61 ▼0.684.52 ▲2.3842.75 ▼4.17
Dashboard /wp-admin2,209 ▲215.90 ▼0.0299.38 ▼14.2538.92 ▼7.77
Posts /wp-admin/edit.php2,086 ▼32.14 ▲0.1339.57 ▲1.5934.31 ▼1.58
Add New Post /wp-admin/post-new.php1,534 ▲2023.19 ▲5.62680.71 ▲3.3552.23 ▼8.24
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0398.53 ▲3.6139.66 ▼2.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/sweet-custom-menu/edit_custom_walker.php+18
    Declaration of Walker_Nav_Menu_Edit_Custom::start_lvl(&$output) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/sweet-custom-menu/custom_walker.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/sweet-custom-menu/edit_custom_walker.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sweet-custom-menu/sweet-custom-menu.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Add custom fields to your menus) image not found
Please take inspiration from this readme.txt

sweet-custom-menu/sweet-custom-menu.php 77% from 13 tests

The entry point to "Sweet Custom Menu" version 0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

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
Everything looks great! No dangerous files found in this plugin230 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34793230

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.33
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin