10% horizontal-slider

Code Review | HORIZONTAL SLIDER

WordPress plugin HORIZONTAL SLIDER scored10%from 54 tests.

About plugin

  • Plugin page: horizontal-slider
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-3.9
  • WordPress version: 6.3.1
  • First release: Jul 6, 2012
  • Latest release: May 8, 2014
  • Number of updates: 22
  • Update frequency: every 30.6 days
  • Top authors: extendyourweb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /30,038 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/horizontal-slider/init.php+898
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.65ms] Passed 4 tests

Analyzing server-side resources used by HORIZONTAL SLIDER
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.61 ▼41.55
Dashboard /wp-admin2.05 ▼1.265.21 ▼47.33
Posts /wp-admin/edit.php2.05 ▼1.315.21 ▼43.90
Add New Post /wp-admin/post-new.php2.05 ▼3.845.53 ▼81.82
Media Library /wp-admin/upload.php2.05 ▼1.185.94 ▼31.86

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_wp_horizontalslider

Browser metrics Passed 4 tests

HORIZONTAL SLIDER: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.28 ▼0.451.77 ▼0.4641.27 ▼5.54
Dashboard /wp-admin2,201 ▲215.55 ▼0.0390.86 ▼3.7844.12 ▲3.91
Posts /wp-admin/edit.php2,106 ▲31.97 ▼0.0035.72 ▼0.6434.01 ▼0.69
Add New Post /wp-admin/post-new.php1,531 ▲323.39 ▲0.08655.57 ▼32.6858.60 ▲4.45
Media Library /wp-admin/upload.php1,403 ▲34.30 ▲0.0996.77 ▼20.9142.89 ▼3.11
Horizontal Slider /wp-admin/init.php260.420.0716.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/horizontal-slider/init.php+898
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_wp_horizontalslider
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/horizontal-slider/template/panel.php
  • 48× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 62
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/horizontal-slider/init.php:277
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 81
    • > PHP Notice
      Undefined variable: width in wp-content/plugins/horizontal-slider/template/panel.php on line 298
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 16
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 242
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 80
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 311
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 300
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/horizontal-slider/template/panel.php on line 95

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/init.php
    • > Network (severe)
    wp-admin/init.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Slider sample.), #2 (Plugin admin.), #3 (Slider Admin.)
  • Tags: Please reduce the number of tags, currently 44 tag instead of maximum 10
You can look at the official readme.txt

horizontal-slider/init.php 85% from 13 tests

The main file in "HORIZONTAL SLIDER" v. 2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 200 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("horizontal-slider.php" instead of "init.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
Good job! No executable or dangerous file extensions detected1,114 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP344969752
HTML310615173
CSS12712149
JavaScript1221040

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
28 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/textbg.png0.08KB0.09KB0.00%
images/previous.png0.91KB0.97KB0.00%
css/images/textbg.png0.08KB0.09KB0.00%
images/next.png0.90KB0.97KB0.00%
images/shadow.png0.10KB0.16KB0.00%