88% button-menu

Code Review | Button Menu Anywhere

WordPress plugin Button Menu Anywhere scored 88% from 54 tests.

About plugin

  • Plugin page: button-menu
  • Plugin version: 0.9.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 5.9.2
  • First release: Jan 27, 2021
  • Latest release: Mar 3, 2022
  • Number of updates: 11
  • Update frequency: every 36.5 days
  • Top authors: dna88 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 428 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼306.32ms] Passed 4 tests

Server-side resources used by Button Menu Anywhere
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0556.98 ▲4.56
Dashboard /wp-admin3.44 ▲0.0334.03 ▼6.69
Posts /wp-admin/edit.php3.66 ▲0.0237.85 ▼4.16
Add New Post /wp-admin/post-new.php6.90 ▼0.0792.02 ▼1,215.05
Media Library /wp-admin/upload.php3.31 ▲0.0225.12 ▲0.61
Button Menu /wp-admin/admin.php?page=qc_button_menu3.3324.24
Duplicate Menu /wp-admin/admin.php?page=qc_duplicate_button_menu3.2922.77

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Button Menu Anywhere
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,965 ▲21116.61 ▲0.999.81 ▲3.622.08 ▼0.04
Dashboard /wp-admin2,958 ▲1046.92 ▲0.77116.91 ▼15.77169.44 ▲11.47
Posts /wp-admin/edit.php2,760 ▲663.55 ▲0.3264.76 ▲0.48170.77 ▲31.33
Add New Post /wp-admin/post-new.php1,708 ▼5216.62 ▼0.83418.99 ▲0.25155.11 ▼3.39
Media Library /wp-admin/upload.php1,764 ▲725.90 ▲0.41128.58 ▼17.29199.98 ▲12.94
Button Menu /wp-admin/admin.php?page=qc_button_menu2,1654.0987.98126.16
Duplicate Menu /wp-admin/admin.php?page=qc_duplicate_button_menu1,0482.8755.14131.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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 fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/button-menu/admin/templates/help.php
    • > /wp-content/plugins/button-menu/button-menu.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/button-menu/admin/settings/settings-page.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nav_menu() in wp-content/plugins/button-menu/templates/shortcode.php:13
    • > PHP Notice
      Undefined index: show_breadcrumb in wp-content/plugins/button-menu/templates/shortcode.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/button-menu/class-dna88-free-plugin-upgrade-notice.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/button-menu/admin/settings/templates/main-admin-menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: nav menu, menu, button menu, buttons, menu shortcode

button-menu/button-menu.php 85% from 13 tests

The primary PHP file in "Button Menu Anywhere" version 0.9.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin17,320 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,954
CSS153,543607,909
PHP612064400
JavaScript2111257

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.67
▷ Minimum class complexity7.00
▷ Maximum class complexity14.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected