77% themehunk-megamenu-plus

Code Review | Easy Mega Menu Plugin for WordPress - ThemeHunk

WordPress plugin Easy Mega Menu Plugin for WordPress - ThemeHunk scored77%from 54 tests.

About plugin

  • Plugin page: themehunk-megamen...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Jan 6, 2023
  • Number of updates: 10
  • Update frequency: every 84.9 days
  • Top authors: themehunk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

5,000+ active /83,313 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼9.90ms] Passed 4 tests

Server-side resources used by Easy Mega Menu Plugin for WordPress - ThemeHunk
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.50 ▼8.99
Dashboard /wp-admin3.47 ▲0.1352.62 ▼12.83
Posts /wp-admin/edit.php3.53 ▲0.1752.30 ▼4.97
Add New Post /wp-admin/post-new.php5.99 ▲0.1079.67 ▼12.81
Media Library /wp-admin/upload.php3.31 ▲0.0837.39 ▲2.70

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Easy Mega Menu Plugin for WordPress - ThemeHunk: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,495 ▲73417.89 ▲3.525.29 ▲3.6737.60 ▼0.53
Dashboard /wp-admin2,801 ▲6218.51 ▲2.86147.72 ▲64.6147.82 ▲5.67
Posts /wp-admin/edit.php2,745 ▲6486.02 ▲4.0882.04 ▲45.8346.19 ▲4.80
Add New Post /wp-admin/post-new.php1,901 ▲36624.89 ▲6.58721.46 ▲79.3250.58 ▼10.40
Media Library /wp-admin/upload.php1,875 ▲4816.12 ▲1.90112.27 ▲10.7960.53 ▲19.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/themehunk-megamenu-plus/notify/notify-html.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant THEMEHUNK_MEGAMENU_URL - assumed 'THEMEHUNK_MEGAMENU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/themehunk-megamenu-plus/notify/notify-html.php on line 11
    • > PHP Notice
      Undefined variable: theme in wp-content/plugins/themehunk-megamenu-plus/notify/notify-html.php on line 42
    • > PHP Notice
      Undefined variable: display in wp-content/plugins/themehunk-megamenu-plus/notify/notify-html.php on line 2
    • > PHP Notice
      Undefined variable: theme in wp-content/plugins/themehunk-megamenu-plus/notify/notify-html.php on line 5
    • > PHP Warning
      Use of undefined constant THEMEHUNK_MEGAMENU_URL - assumed 'THEMEHUNK_MEGAMENU_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/themehunk-megamenu-plus/notify/notify-html.php on line 48

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Drag & Drop Modules), #2 (Default menu styling), #3 (Background Styling)
The official readme.txt is a good inspiration

themehunk-megamenu-plus/themehunk-megamenu.php 77% from 13 tests

"Easy Mega Menu Plugin for WordPress - ThemeHunk" version 1.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.5" instead of "5.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("themehunk-megamenu-plus.php" instead of "themehunk-megamenu.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin15,710 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS123151285,352
PHP158526353,873
JavaScript107357113,814
SVG1002,671

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity33.70
▷ Minimum class complexity5.00
▷ Maximum class complexity87.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods105
▷ Static methods65.71%
▷ Public methods8984.76%
▷ Protected methods00.00%
▷ Private methods1615.24%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
7 compressed PNG files occupy 0.18MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/panel-right.png0.38KB0.40KB0.00%
assets/images/left-align.png0.12KB0.13KB0.00%
assets/images/right-align.png0.12KB0.13KB0.00%
assets/images/center-align.png0.12KB0.13KB0.00%
assets/images/panel-left.png0.32KB0.34KB0.00%