57% advance-menu-manager

Code Review | Advance Menu Manager

WordPress plugin Advance Menu Manager scored 57% from 54 tests.

About plugin

  • Plugin page: advance-menu-manager
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 5.9.2
  • First release: Apr 15, 2016
  • Latest release: Jan 25, 2022
  • Number of updates: 129
  • Update frequency: every 16.4 days
  • Top authors: dots (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active / 30,861 total downloads

Benchmarks

Plugin footprint 48% 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.44MB] [CPU: ▼288.86ms] Passed 4 tests

This is a short check of server-side resources used by Advance Menu Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4062.89 ▲10.89
Dashboard /wp-admin3.92 ▲0.5236.82 ▲2.57
Posts /wp-admin/edit.php4.15 ▲0.5141.44 ▲0.15
Add New Post /wp-admin/post-new.php7.39 ▲0.4298.65 ▼1,160.83
Media Library /wp-admin/upload.php3.72 ▲0.4329.05 ▲2.69
Advance Menu Manager /wp-admin/admin.php?page=advance-menu-manager-pro3.3417.00
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius4.0726.67

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 275 new files
Database: 1 new table, 6 new options
New tables
wp_menu_manager_plus
New WordPress options
amm_post_perpage_option
fs_active_plugins
fs_debug_mode
fs_gdpr
fs_accounts
amm_post_perpage_default

Browser metrics Passed 4 tests

A check of browser resources used by Advance Menu Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,839 ▲8515.88 ▲0.296.40 ▲0.582.40 ▼0.37
Dashboard /wp-admin2,963 ▲1026.17 ▼0.14119.38 ▼18.06185.92 ▲21.33
Posts /wp-admin/edit.php2,761 ▲673.14 ▼0.1069.02 ▲1.61154.77 ▲10.20
Add New Post /wp-admin/post-new.php1,791 ▲3321.30 ▼0.80446.94 ▼12.92157.87 ▼1.75
Media Library /wp-admin/upload.php1,772 ▲805.51 ▲0.01128.08 ▼17.81222.94 ▲41.78
Advance Menu Manager /wp-admin/admin.php?page=advance-menu-manager-pro3,7918.71183.53237.97
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,4942.4752.95112.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/advance-menu-manager/freemius/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 1 table
    • wp_menu_manager_plus
  • This plugin does not fully uninstall, leaving 6 options in the database
    • fs_debug_mode
    • amm_post_perpage_default
    • amm_post_perpage_option
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins

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
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advance-menu-manager/freemius/templates/ajax-loader.php
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant DSAMM_PLUGIN_NAME - assumed 'DSAMM_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/advance-menu-manager/includes/admin/amm-pro-get-started-page.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advance-menu-manager/includes/admin/amm-pro-information-page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/advance-menu-manager/includes/classes/class_admin_menu_walker.php:16
    • > PHP Warning
      Use of undefined constant DSAMM_PRO_PLUGIN_URL - assumed 'DSAMM_PRO_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advance-menu-manager/includes/admin/header/plugin-header.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/advance-menu-manager/includes/admin/header/plugin-header.php:16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advance-menu-manager/freemius/templates/account/partials/addon.php on line 8
    • > PHP Warning
      Use of undefined constant DSAMM_PLUGINPRO_VERSION - assumed 'DSAMM_PLUGINPRO_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/advance-menu-manager/includes/admin/amm-pro-information-page.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advance-menu-manager/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/advance-menu-manager/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/advance-menu-manager/includes/classes/class_activator.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add images for these screenshots: #4 (Add New Menu and Manage), #5 (Add Page or post as menu item), #6 (view menu items attributes)
Please take inspiration from this readme.txt

advance-menu-manager/advance-menu-manager.php Passed 13 tests

"Advance Menu Manager" version 3.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
75 characters long description:
Customize and manage your menu from here. Add, edit, and delete menu items.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin38,143 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PHP1207,57816,61234,189
JavaScript73332111,831
CSS16243671,620
PO File1192293501
Markdown1002

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity89.02
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity4.84
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,155
▷ Static methods17615.24%
▷ Public methods81570.56%
▷ Protected methods151.30%
▷ Private methods32528.14%
Functions109
▷ Named functions109100.00%
▷ Anonymous functions00.00%
Constants133
▷ Global constants10881.20%
▷ Class constants2518.80%
▷ Public constants25100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
82 PNG files occupy 1.32MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/images/thedotstore-images/screenshots/Getting_Started_03.png57.40KB14.25KB▼ 75.17%
includes/admin/images/thedotstore-images/popular-plugins/Advanced-Flat-Rate-Shipping-Method.png4.88KB4.90KB0.00%
admin/images/woo-blocker-lite-prevent-fake-orders-and-blacklist-fraud-customers.png14.89KB6.22KB▼ 58.20%
images/wc-conditional-product-fees.png2.98KB1.58KB▼ 47.03%
includes/admin/images/thedotstore-images/screenshots/Getting_Started_02.png51.51KB16.73KB▼ 67.52%