57% advance-menu-manager

Code Review | Advance Menu Manager

WordPress plugin Advance Menu Manager scored57%from 54 tests.

About plugin

  • Plugin page: advance-menu-manager
  • Plugin version: 3.0.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Nov 2, 2023
  • Number of updates: 143
  • Update frequency: every 19.3 days
  • Top authors: dots (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

1,000+ active /40,042 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.51MB] [CPU: ▲24.53ms] 75% from 4 tests

Analyzing server-side resources used by Advance Menu Manager
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.51MB on /wp-admin/admin.php?page=advance-menu-manager-pro)
PageMemory (MB)CPU Time (ms)
Home /9.29 ▲5.8273.01 ▲29.89
Dashboard /wp-admin9.31 ▲6.0076.55 ▲25.78
Posts /wp-admin/edit.php9.31 ▲5.9585.26 ▲34.22
Add New Post /wp-admin/post-new.php10.15 ▲4.26110.05 ▲12.61
Media Library /wp-admin/upload.php9.31 ▲6.0870.67 ▲29.82
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.3160.03
Advance Menu Manager /wp-admin/admin.php?page=advance-menu-manager-pro9.3149.27

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 268 new files
Database: 1 new table, 11 new options
New tables
wp_menu_manager_plus
New WordPress options
fs_active_plugins
widget_theysaidso_widget
fs_debug_mode
amm_post_perpage_option
amm_post_perpage_default
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Advance Menu Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10614.24 ▼0.131.86 ▼0.1129.28 ▼19.10
Dashboard /wp-admin2,251 ▲775.67 ▲0.0190.58 ▼7.5787.39 ▲43.03
Posts /wp-admin/edit.php2,151 ▲511.99 ▲0.0234.95 ▼2.5036.14 ▲3.41
Add New Post /wp-admin/post-new.php1,445 ▼8318.01 ▼4.89665.43 ▼26.9155.72 ▼9.64
Media Library /wp-admin/upload.php1,453 ▲534.24 ▲0.04100.27 ▼11.8868.41 ▲20.88
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1181.6924.5527.78
Advance Menu Manager /wp-admin/admin.php?page=advance-menu-manager-pro2,9247.19162.3897.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/advance-menu-manager/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_menu_manager_plus
  • Zombie WordPress options detected upon uninstall: 11 options
    • can_compress_scripts
    • fs_active_plugins
    • amm_post_perpage_default
    • db_upgraded
    • fs_debug_mode
    • amm_post_perpage_option
    • widget_recent-comments
    • fs_accounts
    • widget_recent-posts
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=advance-menu-manager-pro
    • > Warning in wp-content/plugins/advance-menu-manager/includes/admin/admin.php+241
    Invalid argument supplied for foreach()

SRP 50% 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
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant DSAMM_PLUGIN_VERSION_TYPE - assumed 'DSAMM_PLUGIN_VERSION_TYPE' (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 4
    • > 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/amm-pro-get-started-page.php on line 2
    • > 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 Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/advance-menu-manager/includes/classes/class_activator.php on line 13
    • > 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-information-page.php on line 2
    • > 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
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/advance-menu-manager/includes/classes/class_activator.php on line 15
    • > 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 Warning
      Use of undefined constant DSAMM_PLUGIN_VERSION_TYPE - assumed 'DSAMM_PLUGIN_VERSION_TYPE' (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 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/nav-menu.php): failed to open stream: No such file or directory in wp-content/plugins/advance-menu-manager/includes/admin/admin.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #6 (view menu items attributes) image required
  • Donate link: Invalid url: ""
You can look at the official readme.txt

advance-menu-manager/advance-menu-manager.php 92% from 13 tests

The entry point to "Advance Menu Manager" version 3.0.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.9" instead of "7.2")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected41,804 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318,43917,89037,239
JavaScript73273131,829
CSS18246741,780
PO File2388624952
Markdown1002
SVG2002

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity86.46
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.76
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,301
▷ Static methods21116.22%
▷ Public methods90169.25%
▷ Protected methods171.31%
▷ Private methods38329.44%
Functions117
▷ Named functions117100.00%
▷ Anonymous functions00.00%
Constants156
▷ Global constants10969.87%
▷ Class constants4730.13%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
55 PNG files occupy 1.18MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/images/thedotstore-images/screenshots/Getting_Started_01.png301.72KB75.80KB▼ 74.88%
includes/admin/images/trash.png1.21KB0.29KB▼ 76.39%
includes/admin/images/thedotstore-images/popular-plugins/Advance-Menu-Manager-For-WordPress.png2.76KB2.76KB0.04%
includes/admin/images/thedotstore-images/screenshots/Getting_Started_04.png114.78KB36.48KB▼ 68.21%
includes/admin/images/thedotstore-images/upgrade.png3.53KB1.84KB▼ 47.79%