89% easy-sidebar-menu-widget

Code Review | Easy Sidebar Menu Widget

WordPress plugin Easy Sidebar Menu Widget scored89%from 54 tests.

About plugin

  • Plugin page: easy-sidebar-menu...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Oct 11, 2016
  • Latest release: Oct 11, 2016
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: phpbits (100%)

Code review

54 tests

User reviews

140 reviews

Install metrics

4,000+ active /28,110 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.40ms] Passed 4 tests

This is a short check of server-side resources used by Easy Sidebar Menu Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0647.81 ▲6.78
Dashboard /wp-admin3.36 ▲0.0648.83 ▼4.51
Posts /wp-admin/edit.php3.41 ▲0.0648.87 ▼2.27
Add New Post /wp-admin/post-new.php5.94 ▲0.0690.71 ▼8.60
Media Library /wp-admin/upload.php3.28 ▲0.0638.16 ▲1.78

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
easy_sidebar_menu_widget_installDate
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_easy_sidebar_menu_widget

Browser metrics Passed 4 tests

Easy Sidebar Menu Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲8813.69 ▼1.029.28 ▲7.0036.49 ▼12.84
Dashboard /wp-admin2,200 ▲235.68 ▲0.1085.14 ▼10.6243.94 ▲1.35
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0236.32 ▲0.4133.42 ▲0.62
Add New Post /wp-admin/post-new.php1,528 ▼623.19 ▲4.76657.16 ▲19.1559.51 ▼8.34
Media Library /wp-admin/upload.php1,402 ▲114.18 ▲0.01104.91 ▲1.9944.72 ▲0.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • easy_sidebar_menu_widget_installDate
    • db_upgraded
    • theysaidso_admin_options
    • widget_easy_sidebar_menu_widget

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Sidebar Menu Widget Demo), #2 (Sidebar Menu Widget)
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt might help

easy-sidebar-menu-widget/plugin.php 92% from 13 tests

"Easy Sidebar Menu Widget" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-sidebar-menu-widget.php" instead of "plugin.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
There were no executable files found in this plugin403 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP64689250
Sass221122
JavaScript24016
SVG11013
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.00
▷ Minimum class complexity5.00
▷ Maximum class complexity14.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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