84% easy-multilevel-nav-menu

Code Review | Easy Multilevel Nav Menu

WordPress plugin Easy Multilevel Nav Menu scored84%from 54 tests.

About plugin

  • Plugin page: easy-multilevel-n...
  • Plugin version: 0.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 10, 2022
  • Latest release: Sep 10, 2022
  • Number of updates: 3
  • Update frequency: every 7.0 days
  • Top authors: byvex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /932 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.65ms] Passed 4 tests

Server-side resources used by Easy Multilevel Nav Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.50 ▲0.17
Dashboard /wp-admin3.32 ▲0.0148.12 ▲2.64
Posts /wp-admin/edit.php3.37 ▲0.0150.49 ▼0.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.76 ▲0.74
Media Library /wp-admin/upload.php3.24 ▲0.0144.42 ▲7.53
Easy Multilevel Menu /wp-admin/themes.php?page=emnm-plugin-page3.2134.62

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Multilevel Nav Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.18 ▼1.171.90 ▲0.0544.00 ▲0.94
Dashboard /wp-admin2,213 ▲255.95 ▲0.07105.91 ▼0.4839.34 ▼3.75
Posts /wp-admin/edit.php2,096 ▲42.02 ▼0.0139.38 ▼0.4337.22 ▼2.71
Add New Post /wp-admin/post-new.php1,522 ▼2023.45 ▲5.00666.96 ▲11.6175.30 ▲18.26
Media Library /wp-admin/upload.php1,392 ▲74.21 ▲0.0497.31 ▼17.4144.24 ▼0.03
Easy Multilevel Menu /wp-admin/themes.php?page=emnm-plugin-page9502.1828.7942.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-multilevel-nav-menu/emnm.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: mega menu, multilevel, navigation, menu

easy-multilevel-nav-menu/emnm.php 85% from 13 tests

"Easy Multilevel Nav Menu" version 0.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-multilevel-nav-menu.php" instead of "emnm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected373 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1305164
PHP12519158
JavaScript19851

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin