10% dynamic-sidebar-menu

Code Review | Dynamic Sidebar Menu

WordPress plugin Dynamic Sidebar Menu scored10%from 54 tests.

About plugin

  • Plugin page: dynamic-sidebar-menu
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9
  • WordPress version: 6.3.1
  • First release: Feb 11, 2014
  • Latest release: Apr 18, 2014
  • Number of updates: 9
  • Update frequency: every 7.4 days
  • Top authors: rmak78 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,802 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/dynamic-sidebar-menu/dynawidgetplugin.php+113
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼53.38ms] Passed 4 tests

This is a short check of server-side resources used by Dynamic Sidebar Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.51 ▼30.60
Dashboard /wp-admin2.05 ▼1.305.33 ▼51.58
Posts /wp-admin/edit.php2.05 ▼1.315.09 ▼39.30
Add New Post /wp-admin/post-new.php2.05 ▼3.845.33 ▼92.05
Media Library /wp-admin/upload.php2.05 ▼1.185.37 ▼30.22

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_dynasidebarmenuwidget

Browser metrics Passed 4 tests

A check of browser resources used by Dynamic Sidebar Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.364.56 ▲2.8145.47 ▲6.51
Dashboard /wp-admin2,206 ▲144.84 ▼0.12106.33 ▲1.7337.54 ▼1.69
Posts /wp-admin/edit.php2,089 ▲32.02 ▼0.0234.20 ▼1.2235.86 ▼0.52
Add New Post /wp-admin/post-new.php1,514 ▼1921.62 ▼1.56672.14 ▲16.2457.05 ▲9.29
Media Library /wp-admin/upload.php1,388 ▲34.23 ▼0.1495.93 ▼11.9741.33 ▼6.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/dynamic-sidebar-menu/dynawidgetplugin.php+113
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_dynasidebarmenuwidget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dynamic-sidebar-menu/dynawidgetplugin.php:11

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 on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 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
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === dynamic-sidebar-menu === )
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (shows sidebar widget created by plugin) image missing
You can take inspiration from this readme.txt

dynamic-sidebar-menu/dynawidgetplugin.php 92% from 13 tests

"Dynamic Sidebar Menu" version 0.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("dynamic-sidebar-menu.php" instead of "dynawidgetplugin.php")

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 detected91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP132091

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin