72% hulvire-slider

Code Review | Hulvire Slider

WordPress plugin Hulvire Slider scored 72% from 54 tests.

About plugin

  • Plugin page: hulvire-slider
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Apr 30, 2015
  • Latest release: Apr 30, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: hulvire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 794 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.70ms] Passed 4 tests

This is a short check of server-side resources used by Hulvire Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.97 ▼10.87
Dashboard /wp-admin3.43 ▲0.1246.63 ▼6.34
Posts /wp-admin/edit.php3.54 ▲0.1848.30 ▼0.50
Add New Post /wp-admin/post-new.php6.03 ▲0.1497.94 ▲4.98
Media Library /wp-admin/upload.php3.35 ▲0.1236.20 ▲2.93
Hulvire Slider /wp-admin/options-general.php?page=wp_hulvire_slider3.3230.71
Všetky slajdy /wp-admin/edit.php?post_type=hulvire_slider3.4035.50
Pridaj nový /wp-admin/post-new.php?post_type=hulvire_slider3.4150.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Hulvire Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20413.75 ▼0.507.83 ▲5.9937.51 ▼4.89
Dashboard /wp-admin2,258 ▲705.13 ▲0.02102.77 ▼8.6781.90 ▲36.36
Posts /wp-admin/edit.php2,141 ▲552.29 ▲0.2938.45 ▼0.2932.09 ▼4.80
Add New Post /wp-admin/post-new.php1,561 ▲2823.33 ▲0.09744.24 ▲51.9137.59 ▼8.68
Media Library /wp-admin/upload.php1,440 ▲554.47 ▲0.2896.64 ▼3.7179.25 ▲36.20
Hulvire Slider /wp-admin/options-general.php?page=wp_hulvire_slider7171.537.0917.69
Všetky slajdy /wp-admin/edit.php?post_type=hulvire_slider1,1482.2633.7934.40
Pridaj nový /wp-admin/post-new.php?post_type=hulvire_slider1,7523.7973.40108.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp_hulvire_slider
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/hulvire-slider/templates/settings.php on line 5 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/hulvire-slider/templates/settings.php(5): do_settings_fields()
    #1 wp-content/plugins/hulvire-slider/hulvire-slider-settings.php(169): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): WP_Hulvire_Slider_Settings->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/hulvire-slider/PopUp.php
    • > /wp-content/plugins/hulvire-slider/hulvire-slider.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined index: postovaneudaje in wp-content/plugins/hulvire-slider/PopUp.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/hulvire-slider/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hulvire-slider/post-types/hulvire-slider-img-type.php:39
    • > PHP Notice
      Undefined index: popupdelay in wp-content/plugins/hulvire-slider/PopUp.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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: Add images for these screenshots: #1 (This is settings of plugin), #2 (This is plugin in wordpress page)
The official readme.txt is a good inspiration

hulvire-slider/hulvire-slider.php 85% from 13 tests

The principal PHP file in "Hulvire Slider" v. 1.4.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 238 characters long)

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
There were no executable files found in this plugin752 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP514672483
CSS2118252
JavaScript34617

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity4.00
▷ Maximum class complexity32.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
11 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flexslider/images/cap-bg.png0.15KB0.09KB▼ 38.61%
flexslider/images/pagination2.png0.52KB0.41KB▼ 20.53%
images/slider-icon3.png1.49KB0.63KB▼ 57.73%
flexslider/images/pagination221.png1.39KB0.67KB▼ 51.75%
flexslider/images/pagination222.png0.24KB0.21KB▼ 12.40%