68% multiple-sidebar-generator

Code Review | Multiple Sidebar Generator

WordPress plugin Multiple Sidebar Generator scored68%from 54 tests.

About plugin

  • Plugin page: multiple-sidebar-...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Mar 26, 2015
  • Latest release: Mar 13, 2017
  • Number of updates: 12
  • Update frequency: every 59.8 days
  • Top authors: deepaksharma (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /5,046 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.61MB] [CPU: ▼47.17ms] Passed 4 tests

Server-side resources used by Multiple Sidebar Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.149.72 ▼34.74
Dashboard /wp-admin2.41 ▼0.8914.09 ▼34.25
Posts /wp-admin/edit.php2.41 ▼0.9413.03 ▼37.07
Add New Post /wp-admin/post-new.php2.41 ▼3.4711.58 ▼82.62
Media Library /wp-admin/upload.php2.41 ▼0.8213.46 ▼23.86
/wp-admin/admin.php?page=multiple-sidebar-generator2.4113.36

Server storage [IO: ▲0.14MB] [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: 20 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
simple_page_sidebars_version
widget_area
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Multiple Sidebar Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.68 ▼0.691.72 ▼0.6138.63 ▼5.09
Dashboard /wp-admin2,200 ▲125.78 ▲0.69101.60 ▼4.8739.16 ▼1.85
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0135.37 ▼7.2833.18 ▼4.17
Add New Post /wp-admin/post-new.php1,514 ▼217.84 ▲0.29658.47 ▲48.2663.17 ▲11.17
Media Library /wp-admin/upload.php1,391 ▲64.32 ▲0.1294.87 ▼4.3242.12 ▼4.12
/wp-admin/admin.php?page=multiple-sidebar-generator8462.3635.9622.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Simple_Page_Sidebars_Widget_Area is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_area
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=multiple-sidebar-generator
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Simple_Page_Sidebars_Widget_Area is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=multiple-sidebar-generator
    • > Notice in wp-content/plugins/multiple-sidebar-generator/admin/admin.php+415
    Undefined index: sidebar

SRP 50% 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 items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/multiple-sidebar-generator/simple-page-sidebars.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Page' not found in wp-content/plugins/multiple-sidebar-generator/admin/includes/class-simple-page-sidebars-walker-page-checklist.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-sidebar-generator/admin/views/edit-sidebar-screen.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/multiple-sidebar-generator/includes/widget-area.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/multiple-sidebar-generator/admin/views/meta-box-sidebar-pages.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-sidebar-generator/admin/views/meta-box-page-sidebar.php:3

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 96% from 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
7 plugin tags: dynamic sidebar, custom sidebars, simple, sidebars, widgets...

multiple-sidebar-generator/simple-page-sidebars.php 92% from 13 tests

The main PHP script in "Multiple Sidebar Generator" version 2.1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("multiple-sidebar-generator.php" instead of "simple-page-sidebars.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,033 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9165376748
PO File38293285

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity25.50
▷ Minimum class complexity3.00
▷ Maximum class complexity64.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods3186.11%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.73KB6.86KB▼ 50.03%
screenshot-2.png48.54KB27.96KB▼ 42.39%