10% sidebar-menu-widget

Code Review | Sidebar Menu Widget

WordPress plugin Sidebar Menu Widget scored10%from 54 tests.

About plugin

  • Plugin page: sidebar-menu-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: Jun 16, 2014
  • Number of updates: 21
  • Update frequency: every 19.4 days
  • Top authors: weblounge (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

600+ active /20,311 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/sidebar-menu-widget/sidebar-menu-widget.php+162
    syntax error, unexpected '}', expecting end of file

Server metrics [RAM: ▼0.01MB] [CPU: ▼14.52ms] Passed 4 tests

An overview of server-side resources used by Sidebar Menu Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.50 ▼6.13
Dashboard /wp-admin3.31 ▼0.0452.15 ▼16.00
Posts /wp-admin/edit.php3.36 ▲0.0049.69 ▼1.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.08 ▼11.47
Media Library /wp-admin/upload.php3.23 ▲0.0033.35 ▼24.47

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sidebar Menu Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼0.864.79 ▲2.7743.51 ▲1.45
Dashboard /wp-admin2,206 ▲184.87 ▼0.98114.37 ▼2.3143.02 ▼2.96
Posts /wp-admin/edit.php2,089 ▼01.98 ▲0.0136.80 ▼4.0734.22 ▼0.67
Add New Post /wp-admin/post-new.php1,533 ▼723.11 ▼0.06680.49 ▼15.5746.67 ▼28.00
Media Library /wp-admin/upload.php1,391 ▲64.20 ▲0.0696.82 ▼19.0743.40 ▼2.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/sidebar-menu-widget/sidebar-menu-widget.php on line 162

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: sidebar menu widget, sidebar menu plugin, sidebar vertical menu, sidebar menu

sidebar-menu-widget/sidebar-menu-widget.php Passed 13 tests

The main PHP script in "Sidebar Menu Widget" version 1.0 is automatically included on every request by WordPress
71 characters long description:
With this plugin you can display menu in sidebar according to nev menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin138 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11813136
CSS1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin