10% slider-range-htapps

Code Review | HT Slider Range for Amazon affiliates

WordPress plugin HT Slider Range for Amazon affiliates scored 10% from 54 tests.

About plugin

  • Plugin page: slider-range-htapps
  • Plugin version: 1.1.10
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 20, 2021
  • Latest release: Apr 13, 2021
  • Number of updates: 42
  • Update frequency: every 0.6 days
  • Top authors: htorresv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 4,271 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/slider-range-htapps/premium/LicenseManagerClient.php+36
    Undefined index: HTAppsSliderRange_update_version

Server metrics [RAM: ▼1.74MB] [CPU: ▼49.39ms] Passed 4 tests

An overview of server-side resources used by HT Slider Range for Amazon affiliates
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0238.93 ▼1.20
Dashboard /wp-admin2.20 ▼1.109.98 ▼40.03
Posts /wp-admin/edit.php2.20 ▼1.159.92 ▼36.16
Add New Post /wp-admin/post-new.php2.20 ▼3.6810.05 ▼94.94
Media Library /wp-admin/upload.php2.20 ▼1.028.83 ▼26.42
Slider range /wp-admin/admin.php?page=ht-slider-range2.2010.03
License /wp-admin/admin.php?page=ht-slider-range-licencia2.2011.15
Product Post /wp-admin/admin.php?page=ht-Post-items-product2.2012.35
Amazon data /wp-admin/admin.php?page=ht-slider-range-data2.2010.65
Slider appearance /wp-admin/admin.php?page=ht-slider-range-style2.209.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 105 new files
Database: 1 new table, 29 new options
New tables
wp_HTSliderRAP_slider_range
New WordPress options
can_compress_scripts
HTSliderRAP_slider_handle_bg
HTSliderRAP_post_btn_bg_hover
HTSliderRAP_data
HTSliderRAP_post_btn_text
HTSliderRAP_post_content_bg
theysaidso_admin_options
HTSliderRAP_post_btn_bg
HTSliderRAP_slider_bar_bg
HTAppsSliderRange_license_status
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for HT Slider Range for Amazon affiliates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲22313.92 ▼0.457.55 ▲5.8644.46 ▲6.48
Dashboard /wp-admin2,247 ▲555.84 ▲0.9095.89 ▼17.0441.40 ▲1.12
Posts /wp-admin/edit.php2,130 ▲412.02 ▲0.0139.72 ▲1.1936.35 ▲1.40
Add New Post /wp-admin/post-new.php1,561 ▲3223.31 ▲4.83673.37 ▲47.0455.94 ▲2.00
Media Library /wp-admin/upload.php1,429 ▲474.19 ▼0.0594.66 ▼3.9843.58 ▼0.96
Slider range /wp-admin/admin.php?page=ht-slider-range1,1371.6924.7228.03
License /wp-admin/admin.php?page=ht-slider-range-licencia8691.7126.5227.48
Product Post /wp-admin/admin.php?page=ht-Post-items-product1,0012.0330.4538.90
Amazon data /wp-admin/admin.php?page=ht-slider-range-data9891.8425.2525.02
Slider appearance /wp-admin/admin.php?page=ht-slider-range-style9512.0322.5228.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/slider-range-htapps/premium/LicenseManagerClient.php+36
    Undefined index: HTAppsSliderRange_update_version
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_HTSliderRAP_slider_range
  • Zombie WordPress options were found after uninstall: 29 options
    • can_compress_scripts
    • HTSliderRAP_post_btn_bg
    • HTSliderRAP_content_text_color
    • db_upgraded
    • HTSliderRAP_post_btn_text_color
    • widget_recent-comments
    • HTSliderRAP_slider_content_bg
    • HTAppsSliderRange_license_serial_code
    • widget_recent-posts
    • HTAppsSliderRange_license_version_update
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ht-slider-range-style
    • > Notice in wp-content/plugins/slider-range-htapps/premium/LicenseManagerClient.php+36
    Undefined index: HTAppsSliderRange_update_version
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ht-slider-range-style
    • > Notice in wp-content/plugins/slider-range-htapps/premium/LicenseManagerClient.php+136
    Undefined index: HTAppsSliderRange_save_serial_and_mail
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+36
    Undefined index: ads_update
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+38
    Undefined index: formClusterUpdate
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+43
    Undefined index: app_id_delete
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+45
    Undefined index: formClusterDelete
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+178
    Undefined variable: update
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+61
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+70
    Trying to get property 'active' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+78
    Trying to get property 'title' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+86
    Trying to get property 'currency' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+94
    Trying to get property 'btn_text' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+110
    Trying to get property 'min' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+118
    Trying to get property 'max' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+126
    Trying to get property 'step' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+134
    Trying to get property 'initial' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+142
    Trying to get property 'end_value' of non-object
    • > GET request to /wp-admin/admin.php?page=ht-slider-range
    • > Notice in wp-content/plugins/slider-range-htapps/views/sliderRange.php+178
    Trying to get property 'search' of non-object

SRP 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/bin/gh-actions-builder.php
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require(wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/format.php on line 3
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/format.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/unit/Moment/MomentCanadianFrenchLocaleTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/unit/Moment/MomentPolishLocaleTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/unit/Moment/MomentUkrainianLocaleTest.php:7
    • > PHP Warning
      require(wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/test.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Moment\\MomentBritishEnglishLocaleTest' not found in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/unit/Moment/MomentSimilarLocaleTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/unit/Moment/MomentLatvianLocaleTest.php:7
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/slider-range-htapps/premium/vendor/fightbulc/moment/tests/unit/Moment/MomentTest.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in slider-range-htapps/assets to your readme.txt
Please take inspiration from this readme.txt

slider-range-htapps/init.php 85% from 13 tests

The entry point to "HT Slider Range for Amazon affiliates" version 1.1.10 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("slider-range-htapps.php" instead of "init.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected7,938 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
PHP831,3641,2536,799
Markdown32180680
HTML1580163
YAML1490153
JSON300113
SVG11013
XML11013
CSS3003
JavaScript1011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.77
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods256
▷ Static methods2810.94%
▷ Public methods23089.84%
▷ Protected methods72.73%
▷ Private methods197.42%
Functions135
▷ Named functions139.63%
▷ Anonymous functions12290.37%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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
No PNG files were detected