78% sliding-widgets

Code Review | Sliding Widgets

WordPress plugin Sliding Widgets scored78%from 54 tests.

About plugin

  • Plugin page: sliding-widgets
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 31, 2012
  • Latest release: Sep 27, 2017
  • Number of updates: 29
  • Update frequency: every 61.8 days
  • Top authors: codename065 (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

1,000+ active /56,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.88ms] Passed 4 tests

This is a short check of server-side resources used by Sliding Widgets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.19 ▼2.01
Dashboard /wp-admin3.33 ▼0.0147.33 ▼20.75
Posts /wp-admin/edit.php3.38 ▲0.0351.08 ▼2.43
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.35 ▼7.15
Media Library /wp-admin/upload.php3.25 ▲0.0335.98 ▼5.19

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Sliding Widgets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲3414.33 ▼0.031.87 ▼0.1445.94 ▲1.21
Dashboard /wp-admin2,214 ▲345.59 ▼0.0293.81 ▲5.8642.40 ▲3.01
Posts /wp-admin/edit.php2,119 ▲191.97 ▼0.0039.16 ▼0.1133.24 ▼7.61
Add New Post /wp-admin/post-new.php1,539 ▲223.00 ▼0.09652.53 ▼4.1954.22 ▼7.16
Media Library /wp-admin/upload.php1,413 ▲134.20 ▼0.0597.23 ▼13.0543.13 ▼3.73

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sliding-widgets/tpls/bottom_css.php
    • > /wp-content/plugins/sliding-widgets/tpls/left_css.php
    • > /wp-content/plugins/sliding-widgets/tpls/right_css.php
    • > /wp-content/plugins/sliding-widgets/tpls/top_css.php
  • 80× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: text_color in wp-content/plugins/sliding-widgets/tpls/right_css.php on line 41
    • > PHP Notice
      Undefined variable: icon_box_width in wp-content/plugins/sliding-widgets/tpls/right_css.php on line 40
    • > PHP Notice
      Undefined variable: icon_box_height in wp-content/plugins/sliding-widgets/tpls/bottom_css.php on line 36
    • > PHP Notice
      Undefined variable: icon_box_height in wp-content/plugins/sliding-widgets/tpls/top_css.php on line 30
    • > PHP Notice
      Undefined variable: label_color in wp-content/plugins/sliding-widgets/tpls/top_css.php on line 24
    • > PHP Notice
      Undefined variable: width in wp-content/plugins/sliding-widgets/tpls/right_css.php on line 12
    • > PHP Notice
      Undefined variable: icon_box_height in wp-content/plugins/sliding-widgets/tpls/right_css.php on line 31
    • > PHP Notice
      Undefined variable: icon_label in wp-content/plugins/sliding-widgets/tpls/bottom.php on line 5
    • > PHP Notice
      Undefined variable: text_color in wp-content/plugins/sliding-widgets/tpls/top_css.php on line 43
    • > PHP Notice
      Undefined variable: icon_box_height in wp-content/plugins/sliding-widgets/tpls/right_css.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: Please take inspiration from this readme.txt

sliding-widgets/sliding-widgets.php Passed 13 tests

The main PHP script in "Sliding Widgets" version 1.5.0 is automatically included on every request by WordPress
77 characters long description:
Sliding Widgets - WordPlress Plugin to create sliding widget area dynamically

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,094 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP116745634
JavaScript116470346
CSS370114

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/trigger.png1.37KB0.88KB▼ 36.27%
images/rainbow.png2.64KB1.74KB▼ 34.05%
images/gradient.png10.11KB8.24KB▼ 18.50%