78% horizontal-scroll-slider

Code Review | Horizontal Scroll Slider

WordPress plugin Horizontal Scroll Slider scored78%from 54 tests.

About plugin

  • Plugin page: horizontal-scroll...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Mar 9, 2016
  • Latest release: Mar 8, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: module.express (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,015 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.05ms] Passed 4 tests

An overview of server-side resources used by Horizontal Scroll Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.38 ▼8.38
Dashboard /wp-admin3.34 ▲0.0450.22 ▲1.29
Posts /wp-admin/edit.php3.40 ▲0.0449.02 ▼2.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.08 ▼14.60
Media Library /wp-admin/upload.php3.27 ▲0.0435.54 ▼2.33
Gallery Category /wp-admin/edit-tags.php?taxonomy=responsive_hss_slider-category&post_type=sp_horizontal_scroll3.2636.08
Gallery showcases /wp-admin/edit.php?post_type=sp_horizontal_scroll&page=responsive_gallery-hss-bar-submenu-page3.2431.18
All Images /wp-admin/edit.php?post_type=sp_horizontal_scroll3.3129.71
Add New /wp-admin/post-new.php?post_type=sp_horizontal_scroll3.3955.64

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Horizontal Scroll Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲14613.47 ▼0.908.16 ▲6.0143.54 ▲5.73
Dashboard /wp-admin2,236 ▲655.63 ▲0.0591.29 ▲3.9238.29 ▼0.29
Posts /wp-admin/edit.php2,135 ▲352.00 ▲0.0239.42 ▲0.9836.68 ▼3.50
Add New Post /wp-admin/post-new.php1,558 ▲3223.44 ▼0.05670.71 ▼24.4355.89 ▲9.56
Media Library /wp-admin/upload.php1,432 ▲324.21 ▼0.07100.32 ▼10.0742.88 ▼5.06
Gallery Category /wp-admin/edit-tags.php?taxonomy=responsive_hss_slider-category&post_type=sp_horizontal_scroll1,2892.1227.4131.02
Gallery showcases /wp-admin/edit.php?post_type=sp_horizontal_scroll&page=responsive_gallery-hss-bar-submenu-page8342.1725.5529.01
All Images /wp-admin/edit.php?post_type=sp_horizontal_scroll1,1191.9029.6026.44
Add New /wp-admin/post-new.php?post_type=sp_horizontal_scroll2,3397.59176.6065.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_post_thumbnail() in wp-content/plugins/horizontal-scroll-slider/designs/template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/horizontal-scroll-slider/hss_gallery_admin_settings_center.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/horizontal-scroll-slider/horizontal-scroll-slider.php:420

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=sp_horizontal_scroll&page=responsive_gallery-hss-bar-submenu-page
    • > Network (severe)
    wp-content/plugins/horizontal-scroll-slider/images/design-1.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Designs Views from admin side), #2 (Catagroies shortcode)
Please take inspiration from this readme.txt

horizontal-scroll-slider/horizontal-scroll-slider.php Passed 13 tests

"Horizontal Scroll Slider" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
44 characters long description:
A simple Responsive Horizontal Scroll Slider

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,995 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1207171,293
PHP36326376
CSS44124326

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/hotnewsep.png0.92KB0.09KB▼ 90.39%
images/icon_total_01.png6.39KB1.90KB▼ 70.31%
images/hotnewsepa.png1.03KB0.18KB▼ 82.29%
images/icon_navlq.png1.60KB0.45KB▼ 71.75%
images/bg_topright.png1.30KB0.31KB▼ 75.92%