71% popping-sidebars-and-widgets-light

Code Review | Popping Sidebars and Widgets Light

WordPress plugin Popping Sidebars and Widgets Light scored71%from 54 tests.

About plugin

  • Plugin page: popping-sidebars-...
  • Plugin version: 1.27
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Oct 9, 2014
  • Latest release: Apr 1, 2022
  • Number of updates: 24
  • Update frequency: every 113.8 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /17,849 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼7.19ms] Passed 4 tests

Analyzing server-side resources used by Popping Sidebars and Widgets Light
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.14 ▲0.73
Dashboard /wp-admin3.56 ▲0.2557.44 ▼10.74
Posts /wp-admin/edit.php3.61 ▲0.2558.54 ▲2.69
Add New Post /wp-admin/post-new.php6.09 ▲0.21103.59 ▼21.43
Media Library /wp-admin/upload.php3.43 ▲0.2146.16 ▲3.44
Overlay action /wp-admin/admin.php?page=otw-pswl-action3.4342.39
otwfcr /wp-admin/admin.php?page=otwfcr3.4144.47
Plugin Options /wp-admin/admin.php?page=otw-pswl-options3.4243.46
Add Overlay /wp-admin/admin.php?page=otw-pswl-manage3.5346.11
All Sidebars /wp-admin/admin.php?page=otw-pswl-sidebars-list3.4561.52
Add Sidebar /wp-admin/admin.php?page=otw-pswl-sidebars-manage3.4542.61
License Manager /wp-admin/admin.php?page=otw-pswl-lm3.53253.90
Sidebar action /wp-admin/admin.php?page=otw-pswl-sidebars-action3.4441.89
All Overlays /wp-admin/admin.php?page=otw-pswl3.4542.98

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 186 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Popping Sidebars and Widgets Light
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19413.92 ▼0.486.76 ▲4.9443.40 ▼2.78
Dashboard /wp-admin2,265 ▲745.15 ▼0.72108.89 ▼16.0778.29 ▲31.71
Posts /wp-admin/edit.php2,158 ▲552.31 ▲0.2740.13 ▲1.7139.38 ▲3.41
Add New Post /wp-admin/post-new.php1,581 ▲3623.27 ▼0.03680.92 ▼21.4073.74 ▲10.91
Media Library /wp-admin/upload.php1,455 ▲524.52 ▲0.25109.57 ▲1.3888.60 ▲36.22
Overlay action /wp-admin/admin.php?page=otw-pswl-action7231.6312.3217.87
otwfcr /wp-admin/admin.php?page=otwfcr8351.8227.9426.26
Plugin Options /wp-admin/admin.php?page=otw-pswl-options9411.9632.0344.44
Add Overlay /wp-admin/admin.php?page=otw-pswl-manage1,8173.7171.3996.58
All Sidebars /wp-admin/admin.php?page=otw-pswl-sidebars-list8931.9639.5835.12
Add Sidebar /wp-admin/admin.php?page=otw-pswl-sidebars-manage9941.9630.2234.19
License Manager /wp-admin/admin.php?page=otw-pswl-lm9721.8231.6230.03
Sidebar action /wp-admin/admin.php?page=otw-pswl-sidebars-action7231.6211.0821.78
All Overlays /wp-admin/admin.php?page=otw-pswl8901.9632.1132.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% 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=otw-pswl-manage
    • > Deprecated in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_functions/otw_functions.php+272
    Function get_magic_quotes_gpc() is deprecated

SRP 0% 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
    • > /wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/side_box.view.php
    • > /wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_factory/views/action_message.php
    • > /wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/full_bar.view.php
    • > /wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/lightbox.view.php
  • 122× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/full_bar.view.php on line 6
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/full_bar.view.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/lightbox.view.php on line 2
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/side_box.view.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/lightbox.view.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/full_bar.view.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/full_bar.view.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_shortcode/libs/recaptcha-php-1.11/example-captcha.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/pswl/side_box.view.php on line 4
    • > PHP Notice
      Undefined variable: overlay_vars in wp-content/plugins/popping-sidebars-and-widgets-light/include/otw_components/otw_overlay_light/views/full_bar.view.php on line 4

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots require images: #1 (Full Bar Header - closed), #2 (Full Bar Header - opened), #3 (Side Box Right - closed), #4 (Side Box Right - opened), #5 (Lightbox), #6 (Create sidebars), #7 (Overlay options page), #8 (OTW Grid Manager)
The official readme.txt might help

popping-sidebars-and-widgets-light/otw_popping_sidebars_and_widgets.php 92% from 13 tests

"Popping Sidebars and Widgets Light" version 1.27's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("popping-sidebars-and-widgets-light.php" instead of "otw_popping_sidebars_and_widgets.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin26,018 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
CSS2072923610,153
PHP452,3901,2989,759
JavaScript191,058993,397
SVG4002,709

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity74.45
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity5.51
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods179
▷ Static methods2111.73%
▷ Public methods13173.18%
▷ Protected methods2715.08%
▷ Private methods2111.73%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
64 PNG files occupy 1.36MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png105.35KB42.46KB▼ 59.69%
include/otw_components/otw_overlay_shortcode/images/testimonials-nav.png0.55KB0.72KB0.00%
screenshot-6.png30.67KB13.04KB▼ 57.48%
include/otw_components/otw_form/img/colorpicker/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
images/swm-selected.png3.81KB0.25KB▼ 93.36%