77% quadmenu

Code Review | WordPress Mega Menu - QuadMenu

WordPress plugin WordPress Mega Menu - QuadMenu scored77%from 54 tests.

About plugin

  • Plugin page: quadmenu
  • Plugin version: 3.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Feb 2, 2018
  • Latest release: Nov 17, 2023
  • Number of updates: 246
  • Update frequency: every 8.6 days
  • Top authors: quadlayers (99.59%)

Code review

54 tests

User reviews

246 reviews

Install metrics

20,000+ active /858,622 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.97MB] [CPU: ▲2.94ms] 75% from 4 tests

This is a short check of server-side resources used by WordPress Mega Menu - QuadMenu
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 633.17ms on /wp-admin/admin.php?page=quadmenu_welcome_suggestions)
PageMemory (MB)CPU Time (ms)
Home /7.62 ▲4.1654.57 ▲13.87
Dashboard /wp-admin4.35 ▲1.0153.35 ▼4.89
Posts /wp-admin/edit.php4.36 ▲1.0053.30 ▲2.88
Add New Post /wp-admin/post-new.php6.85 ▲0.9690.58 ▲6.54
Media Library /wp-admin/upload.php4.15 ▲0.9243.18 ▲7.23
Options /wp-admin/admin.php?page=quadmenu_options9.08356.23
Premium /wp-admin/admin.php?page=quadmenu_welcome_premium4.1841.59
Welcome /wp-admin/admin.php?page=quadmenu_welcome4.1738.39
Suggestions /wp-admin/admin.php?page=quadmenu_welcome_suggestions4.54633.17
System /wp-admin/admin.php?page=quadmenu_welcome_system4.2242.94

Server storage [IO: ▲11.86MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 684 new files
Database: no new tables, 11 new options
New WordPress options
redux_version_upgraded_from
widget_quadmenu_widget
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
quadmenu_twentytwentyone
can_compress_scripts
quadmenu_twentytwentyone-transients
theysaidso_admin_options
...

Browser metrics Passed 4 tests

WordPress Mega Menu - QuadMenu: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,044 ▲28613.54 ▼0.8211.43 ▲9.4335.43 ▼9.78
Dashboard /wp-admin2,322 ▲1455.56 ▼0.15105.83 ▲3.3875.75 ▲31.98
Posts /wp-admin/edit.php2,150 ▲501.95 ▼0.0639.06 ▼1.1334.23 ▼1.91
Add New Post /wp-admin/post-new.php1,714 ▲18822.02 ▼1.16774.63 ▲125.7649.65 ▼1.04
Media Library /wp-admin/upload.php1,447 ▲474.17 ▼0.0595.25 ▼2.6873.11 ▲32.16
Options /wp-admin/admin.php?page=quadmenu_options5,3239.77264.17168.47
Premium /wp-admin/admin.php?page=quadmenu_welcome_premium1,0611.8933.9844.20
Welcome /wp-admin/admin.php?page=quadmenu_welcome9671.8833.2938.56
Suggestions /wp-admin/admin.php?page=quadmenu_welcome_suggestions1,9812.3933.2451.52
System /wp-admin/admin.php?page=quadmenu_welcome_system1,2971.9125.4635.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 11 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • quadmenu_twentytwentyone-transients
    • widget_theysaidso_widget
    • quadmenu_twentytwentyone
    • quadmenu_twentytwentyone_locations
    • widget_quadmenu_widget
    • widget_recent-posts
    • widget_recent-comments
    • ...

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 46× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/quadmenu/lib/class-admin.php
    • > /wp-content/plugins/quadmenu/lib/class-themes.php
    • > /wp-content/plugins/quadmenu/lib/class-widget.php
    • > /wp-content/plugins/quadmenu/lib/panel/class-system.php
    • > /wp-content/plugins/quadmenu/lib/integrations/class-vc.php
    • > /wp-content/plugins/quadmenu/lib/frontend/class-frontend.php
    • > /wp-content/plugins/quadmenu/lib/frontend/walker/class-quadmenu-item-mega.php
    • > /wp-content/plugins/quadmenu/lib/class-activation.php
    • > /wp-content/plugins/quadmenu/lib/class-import.php
    • > /wp-content/plugins/quadmenu/lib/frontend/walker/class-quadmenu-item.php
  • 58× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/quadmenu/templates/logo.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Panel' not found in wp-content/plugins/quadmenu/redux/ReduxCore/inc/extensions/customizer/inc/customizer_panel.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function QuadLayers\\QuadMenu\\wp_upload_dir() in wp-content/plugins/quadmenu/lib/class-plugin.php:183
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/quadmenu/redux/ReduxCore/templates/panel/header.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/quadmenu/lib/integrations/beaver/module.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/quadmenu/lib/panel/pages/welcome.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/quadmenu/redux/redux/template/header_stickybar.tpl.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/quadmenu/templates/layout/offcanvas.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/quadmenu/redux/ReduxCore/inc/welcome/views/extensions.php:64
    • > PHP Warning
      Use of undefined constant QUADMENU_PLUGIN_VERSION - assumed 'QUADMENU_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/quadmenu/lib/panel/pages/welcome.php on line 8

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #2, #3, #4, #5, #6, #7, #8, #9 in quadmenu/assets to your readme.txt
Please take inspiration from this readme.txt

quadmenu/quadmenu.php Passed 13 tests

The main file in "WordPress Mega Menu - QuadMenu" v. 3.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
The best drag & drop WordPress Mega Menu plugin which allow you to create Tabs Menus & Carousel Menus.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin79,386 lines of code in 485 files:
LanguageFilesBlank linesComment linesLines of code
PHP2216,4727,72428,325
CSS743,79711516,468
JavaScript1032,7382,05312,622
SVG9039,753
Sass541,187607,580
LESS85751092,479
JSON318401,368
Markdown122710734
JSX114157

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity25.72
▷ Minimum class complexity1.00
▷ Maximum class complexity884.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces21
Interfaces0
Traits3
Classes171
▷ Abstract classes10.58%
▷ Concrete classes17099.42%
▷ Final classes10.59%
Methods1,105
▷ Static methods21419.37%
▷ Public methods92483.62%
▷ Protected methods958.60%
▷ Private methods867.78%
Functions53
▷ Named functions3769.81%
▷ Anonymous functions1630.19%
Constants110
▷ Global constants5348.18%
▷ Class constants5751.82%
▷ Public constants57100.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
51 PNG files occupy 0.41MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
redux/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
assets/backend/img/layouts/collapse.png0.13KB0.14KB0.00%
redux/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
redux/ReduxCore/assets/img/3cm.png2.96KB0.29KB▼ 90.35%
assets/backend/img/icon-dark-18x18.png14.83KB0.39KB▼ 97.38%