78% responsive-sidebar

Code Review | Responsive Sidebar

WordPress plugin Responsive Sidebar scored78%from 54 tests.

About plugin

  • Plugin page: responsive-sidebar
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.3-5.6
  • WordPress version: 6.3.1
  • First release: Feb 14, 2019
  • Latest release: Jan 16, 2021
  • Number of updates: 12
  • Update frequency: every 58.5 days
  • Top authors: processby (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /6,317 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.89ms] Passed 4 tests

Server-side resources used by Responsive Sidebar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2042.39 ▲1.01
Dashboard /wp-admin3.46 ▲0.1145.80 ▼15.17
Posts /wp-admin/edit.php3.57 ▲0.2149.20 ▼0.08
Add New Post /wp-admin/post-new.php6.04 ▲0.1590.78 ▼4.82
Media Library /wp-admin/upload.php3.38 ▲0.1535.60 ▼3.48
Responsive Sidebar /wp-admin/options-general.php?page=responsive-sidebar-admin3.3630.03

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

Browser metrics Passed 4 tests

Responsive Sidebar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.35 ▲0.162.06 ▲0.4046.83 ▼1.02
Dashboard /wp-admin2,198 ▲215.49 ▼0.3683.20 ▼16.4339.29 ▼4.86
Posts /wp-admin/edit.php2,109 ▲121.97 ▼0.0638.82 ▲2.8436.15 ▲1.58
Add New Post /wp-admin/post-new.php1,531 ▲523.43 ▲0.40680.30 ▲10.5852.91 ▼0.31
Media Library /wp-admin/upload.php1,409 ▲94.22 ▲0.0194.81 ▼9.6445.01 ▼4.23
Responsive Sidebar /wp-admin/options-general.php?page=responsive-sidebar-admin8852.1526.3935.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=responsive-sidebar-admin
    • > Notice in wp-content/plugins/responsive-sidebar/views/admin/section/main-settings.php+43
    Undefined index: sidebar-2
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=responsive-sidebar-admin
    • > Notice in wp-content/plugins/responsive-sidebar/views/admin/section/main-settings.php+43
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/responsive-sidebar/src/Admin/Customizer/CustomizeDonate.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/responsive-sidebar/src/Admin/Customizer/CustomizeLabel.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Responsive Sidebar on a small screen), #2 (Responsive Sidebar hidden on a small screen), #3 (Sidebar on a large screen (WooCommerce filtres))
Please take inspiration from this readme.txt

responsive-sidebar/responsive-sidebar.php 92% from 13 tests

The main PHP file in "Responsive Sidebar" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,588 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP254333311,423
JSON31072
Markdown153070
CSS11123

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.07
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods77
▷ Static methods56.49%
▷ Public methods7293.51%
▷ Protected methods00.00%
▷ Private methods56.49%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.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.15MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/frontend/img/sidebar-icon.png0.65KB0.68KB0.00%
screenshot-3.png152.65KB66.54KB▼ 56.41%