10% bp-direct-menus

Code Review | BP Direct Menus

WordPress plugin BP Direct Menus scored10%from 54 tests.

About plugin

  • Plugin page: bp-direct-menus
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 29, 2013
  • Latest release: Sep 29, 2013
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: mrwulf (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

60+ active /5,906 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/bp-direct-menus/bpdirectmenu.php+18
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼65.91ms] Passed 4 tests

This is a short check of server-side resources used by BP Direct Menus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.424.95 ▼41.31
Dashboard /wp-admin2.07 ▼1.245.58 ▼48.36
Posts /wp-admin/edit.php2.07 ▼1.295.46 ▼50.25
Add New Post /wp-admin/post-new.php2.07 ▼3.825.35 ▼123.73
Media Library /wp-admin/upload.php2.07 ▼1.165.59 ▼31.42

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BP Direct Menus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.071.74 ▼0.1445.52 ▲7.01
Dashboard /wp-admin2,189 ▲85.51 ▼0.1486.00 ▼18.1839.86 ▼5.60
Posts /wp-admin/edit.php2,097 ▼31.97 ▲0.0135.21 ▼0.1732.62 ▼5.23
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▲0.13687.85 ▲54.5857.68 ▲3.75
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.02102.40 ▼14.4046.49 ▼3.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/bp-direct-menus/bpdirectmenu.php+18
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/bp-direct-menus/inc/frontend-noajax.inc.php
    • > /wp-content/plugins/bp-direct-menus/inc/backend-noajax.inc.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-direct-menus/bpdirectmenu.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #2, #3 in bp-direct-menus/assets to your readme.txt
The official readme.txt is a good inspiration

bp-direct-menus/bpdirectmenu.php 92% from 13 tests

This is the main PHP file of "BP Direct Menus" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bp-direct-menus.php" instead of "bpdirectmenu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin241 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34321241

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin