83% opal-megamenu-for-elementor

Code Review | Opal Mega Menu

WordPress plugin Opal Mega Menu scored83%from 54 tests.

About plugin

  • Plugin page: opal-megamenu-for...
  • Plugin version: 1.1.16
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2018
  • Latest release: Feb 7, 2023
  • Number of updates: 33
  • Update frequency: every 48.0 days
  • Top authors: wpopal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /23,760 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
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼3.70ms] Passed 4 tests

Server-side resources used by Opal Mega Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1741.91 ▼1.20
Dashboard /wp-admin3.52 ▲0.1849.44 ▼7.75
Posts /wp-admin/edit.php3.64 ▲0.2451.14 ▲0.15
Add New Post /wp-admin/post-new.php6.10 ▲0.1785.76 ▼5.99
Media Library /wp-admin/upload.php3.44 ▲0.1742.32 ▲2.91
Megamenu Template /wp-admin/admin.php?page=dashboard3.4135.11

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

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

Browser metrics Passed 4 tests

Opal Mega Menu: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.15 ▼0.441.69 ▲0.1840.20 ▼2.39
Dashboard /wp-admin2,198 ▲185.55 ▼0.0290.20 ▼5.4738.05 ▼2.26
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0433.58 ▼3.5436.12 ▲1.37
Add New Post /wp-admin/post-new.php1,529 ▲323.22 ▼0.01687.65 ▲25.8356.42 ▲3.61
Media Library /wp-admin/upload.php1,406 ▲64.13 ▼0.06114.52 ▲7.8647.41 ▲0.56
Megamenu Template /wp-admin/admin.php?page=dashboard8032.1525.7029.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/opal-megamenu-for-elementor/templates/single-menu.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

opal-megamenu-for-elementor/opalmegamenu.php 85% from 13 tests

The main PHP script in "Opal Mega Menu" version 1.1.16 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 179 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("opal-megamenu-for-elementor.php" instead of "opalmegamenu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin7,075 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP136323434,155
CSS327981,642
JavaScript453961,278

PHP code Passed 2 tests

This is a very shot 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.22
Average class complexity11.70
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods70
▷ Static methods45.71%
▷ Public methods5172.86%
▷ Protected methods1014.29%
▷ Private methods912.86%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin