83% bellows-accordion-menu

Code Review | Bellows Accordion Menu

WordPress plugin Bellows Accordion Menu scored83%from 54 tests.

About plugin

  • Plugin page: bellows-accordion...
  • Plugin version: 1.4.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2016
  • Latest release: Sep 15, 2023
  • Number of updates: 36
  • Update frequency: every 70.1 days
  • Top authors: sevenspark (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

10,000+ active /83,510 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.58MB] [CPU: ▲1.23ms] Passed 4 tests

This is a short check of server-side resources used by Bellows Accordion Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5752.45 ▲12.76
Dashboard /wp-admin3.89 ▲0.5851.93 ▼3.08
Posts /wp-admin/edit.php3.94 ▲0.5858.00 ▲7.06
Add New Post /wp-admin/post-new.php6.47 ▲0.58102.77 ▼1.42
Media Library /wp-admin/upload.php3.81 ▲0.5840.10 ▲2.35
Bellows Menu /wp-admin/themes.php?page=bellows-settings3.8141.84

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 9 new options
New WordPress options
bellows_general
bellows_main
widget_bellows_navigation_widget
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Bellows Accordion Menu: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲15014.10 ▼0.326.51 ▲4.8843.42 ▼2.16
Dashboard /wp-admin2,225 ▲254.88 ▲0.02105.27 ▼0.6640.16 ▼1.35
Posts /wp-admin/edit.php2,107 ▲102.00 ▲0.0039.21 ▲3.4835.86 ▼1.65
Add New Post /wp-admin/post-new.php1,544 ▼023.61 ▲0.44656.47 ▲9.3050.29 ▼6.94
Media Library /wp-admin/upload.php1,404 ▲44.13 ▼0.10100.44 ▼1.4344.94 ▼2.80
Bellows Menu /wp-admin/themes.php?page=bellows-settings1,5423.6856.5690.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_bellows_navigation_widget
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • bellows_main
    • bellows_general

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant BELLOWS_DIR - assumed 'BELLOWS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bellows-accordion-menu/includes/functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/bellows-accordion-menu/includes/BellowsWalker.class.php:9
    • > PHP Warning
      Use of undefined constant BELLOWS_DIR - assumed 'BELLOWS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bellows-accordion-menu/admin/admin.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'BELLOWS_DIRincludes/asset.loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/bellows-accordion-menu/includes/functions.php on line 3
    • > PHP Warning
      A non-numeric value encountered in wp-content/plugins/bellows-accordion-menu/Bellows.class.php on line 73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bellows-accordion-menu/includes/bellows.api.php:42
    • > PHP Fatal error
      require_once(): Failed opening required 'BELLOWS_DIRincludes/BellowsWalker.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/bellows-accordion-menu/Bellows.class.php on line 87
    • > PHP Warning
      Use of undefined constant BELLOWS_DIR - assumed 'BELLOWS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bellows-accordion-menu/customizer/customizer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bellows-accordion-menu/includes/skins.php:17
    • > PHP Warning
      require_once(BELLOWS_DIRincludes/BellowsWalker.class.php): failed to open stream: No such file or directory in wp-content/plugins/bellows-accordion-menu/Bellows.class.php on line 87

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === bellows-accordion-menu === )
The official readme.txt might help

bellows-accordion-menu/bellows-accordion-menu.php 92% from 13 tests

"Bellows Accordion Menu" version 1.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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

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
Good job! No executable or dangerous file extensions detected22,980 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JSON10014,244
CSS885413,939
PHP201,1388192,837
JavaScript3286297969
SVG100640
LESS43418351

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity47.60
▷ Minimum class complexity5.00
▷ Maximum class complexity95.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods72
▷ Static methods22.78%
▷ Public methods6995.83%
▷ Protected methods00.00%
▷ Private methods34.17%
Functions114
▷ Named functions11399.12%
▷ Anonymous functions10.88%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected