84% c4d-mega-menu

Code Review | Mega Menu

WordPress plugin Mega Menu scored84%from 54 tests.

About plugin

  • Plugin page: c4d-mega-menu
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Aug 25, 2017
  • Number of updates: 10
  • Update frequency: every 18.9 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,358 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.79ms] Passed 4 tests

This is a short check of server-side resources used by Mega Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.38 ▼6.75
Dashboard /wp-admin3.34 ▲0.0343.88 ▼2.78
Posts /wp-admin/edit.php3.39 ▲0.0343.93 ▼3.21
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.13 ▲5.14
Media Library /wp-admin/upload.php3.26 ▲0.0335.17 ▲1.60

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Mega Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲14813.59 ▼0.718.76 ▲5.9840.23 ▼7.60
Dashboard /wp-admin2,209 ▲214.82 ▼0.08108.97 ▼1.4839.84 ▼5.43
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.0839.39 ▼0.2835.08 ▲0.08
Add New Post /wp-admin/post-new.php1,542 ▲1918.67 ▼4.62593.14 ▼105.3063.07 ▲11.91
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.1296.84 ▼3.3741.40 ▼2.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-mega-menu/c4d-mega-menu.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

c4d-mega-menu/c4d-mega-menu.php 92% from 13 tests

The main PHP script in "Mega Menu" version 2.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 227 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin474 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
Sass211220
PHP1109159
JavaScript44093
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin