83% groovy-menu-free

Code Review | Wordpress Mega menu Plugin - Groovy Menu (Free)

WordPress plugin Wordpress Mega menu Plugin - Groovy Menu (Free) scored83%from 54 tests.

About plugin

  • Plugin page: groovy-menu-free
  • Plugin version: 1.4.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.7-6.1
  • WordPress version: 6.3.1
  • First release: Jul 5, 2019
  • Latest release: Mar 14, 2023
  • Number of updates: 108
  • Update frequency: every 12.5 days
  • Top authors: grooni (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

7,000+ active /168,328 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲4.83MB] [CPU: ▲41.99ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Mega menu Plugin - Groovy Menu (Free)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /10.52 ▲7.06194.01 ▲157.23
Dashboard /wp-admin8.40 ▲5.0597.95 ▲33.39
Posts /wp-admin/edit.php8.40 ▲5.04106.25 ▲57.18
Add New Post /wp-admin/post-new.php9.93 ▲4.04126.33 ▲20.34
Media Library /wp-admin/upload.php8.40 ▲5.1791.80 ▲57.05
Integration /wp-admin/admin.php?page=groovy_menu_integration9.35318.85
Welcome /wp-admin/admin.php?page=groovy_menu_welcome8.4083.73
Premium /wp-admin/admin.php?page=groovy_menu_premium8.4074.92
Dashboard /wp-admin/admin.php?page=groovy_menu_settings9.98108.39
Menus /wp-admin/admin.php?page=groovy_menu_menus8.4079.86

Server storage [IO: ▲4.77MB] [DB: ▲0.04MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 254 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
theysaidso_admin_options
groovy_menu_settings_fonts
groovy_menu_default_preset
groovy_menu_db_version__msg_data
groovy_menu_db_version
groovy_menu_added_capabilities
widget_recent-comments
can_compress_scripts
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Mega menu Plugin - Groovy Menu (Free)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲19917.08 ▲2.7036.67 ▲34.9944.99 ▲1.49
Dashboard /wp-admin2,261 ▲735.93 ▲1.09110.93 ▲4.3742.33 ▼3.96
Posts /wp-admin/edit.php2,147 ▲552.10 ▲0.1041.01 ▲3.7934.90 ▲0.83
Add New Post /wp-admin/post-new.php1,571 ▲5723.21 ▲5.73614.31 ▼88.6956.82 ▼5.01
Media Library /wp-admin/upload.php1,443 ▲524.29 ▲0.1096.58 ▼4.5240.21 ▼6.52
Integration /wp-admin/admin.php?page=groovy_menu_integration4,3013.6960.27114.05
Welcome /wp-admin/admin.php?page=groovy_menu_welcome1,3521.7522.7158.08
Premium /wp-admin/admin.php?page=groovy_menu_premium4,3236.49425.69201.73
Dashboard /wp-admin/admin.php?page=groovy_menu_settings4,3578.35160.50105.04
Menus /wp-admin/admin.php?page=groovy_menu_menus3,2134.6073.4531.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • groovy_menu_added_capabilities
    • groovy_menu_db_version
    • db_upgraded
    • can_compress_scripts
    • groovy_menu_default_preset
    • theysaidso_admin_options
    • groovy_menu_db_version__msg_data
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 81× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/groovy-menu-free/template/Preview.php
    • > /wp-content/plugins/groovy-menu-free/includes/theme_support/avada.php
    • > /wp-content/plugins/groovy-menu-free/includes/theme_support/thrivethemes-gm-init.php
    • > /wp-content/plugins/groovy-menu-free/includes/modules/virtualpages/inc/VirtualPagesPageInterface.php
    • > /wp-content/plugins/groovy-menu-free/includes/modules/core/inc/GroovyMenuPreset.php
    • > /wp-content/plugins/groovy-menu-free/includes/modules/fields/inc/FieldIcon.php
    • > /wp-content/plugins/groovy-menu-free/includes/modules/fields/inc/FieldExport.php
    • > /wp-content/plugins/groovy-menu-free/includes/modules/fields/inc/FieldLogoType.php
    • > /wp-content/plugins/groovy-menu-free/includes/modules/core/inc/GroovyMenuStyle.php
    • > /wp-content/plugins/groovy-menu-free/includes/modules/fields/inc/FieldInlineEnd.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

groovy-menu-free/groovy-menu.php 85% from 13 tests

The main PHP file in "Wordpress Mega menu Plugin - Groovy Menu (Free)" ver. 1.4.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("groovy-menu-free.php" instead of "groovy-menu.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected63,560 lines of code in 169 files:
LanguageFilesBlank linesComment linesLines of code
PHP1094,5373,67240,096
CSS194,66158520,274
PO File11,0861,5152,593
SVG1609418
JSON820105
JavaScript1338243
JSX212426
XML1005

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 205)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity40.38
▷ Minimum class complexity1.00
▷ Maximum class complexity539.00
Average method complexity5.41
▷ Minimum method complexity1.00
▷ Maximum method complexity205.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes75
▷ Abstract classes00.00%
▷ Concrete classes75100.00%
▷ Final classes11.33%
Methods713
▷ Static methods16122.58%
▷ Public methods61085.55%
▷ Protected methods8211.50%
▷ Private methods212.95%
Functions76
▷ Named functions6281.58%
▷ Anonymous functions1418.42%
Constants70
▷ Global constants1318.57%
▷ Class constants5781.43%
▷ Public constants57100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-type-text.png2.63KB0.82KB▼ 68.76%
assets/images/logo-type-img.png2.83KB1.19KB▼ 57.88%
(invalid) assets/images/pattern-preview.png0.62KB0.00KB▼ 100.00%
assets/images/laptop-with-bg.png45.12KB17.47KB▼ 61.28%
assets/images/preview-color-transparent.png0.39KB0.40KB0.00%