72% ultra-responsive-slider

Code Review | Ultra Responsive Slider

WordPress plugin Ultra Responsive Slider scored72%from 54 tests.

About plugin

  • Plugin page: ultra-responsive-...
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 6, 2017
  • Latest release: Oct 10, 2017
  • Number of updates: 11
  • Update frequency: every 6.0 days
  • Top authors: clickitplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Ultra Responsive Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.73 ▼1.44
Dashboard /wp-admin3.34 ▲0.0457.59 ▲3.86
Posts /wp-admin/edit.php3.46 ▲0.1050.41 ▼0.24
Add New Post /wp-admin/post-new.php5.93 ▲0.0498.68 ▼1.17
Media Library /wp-admin/upload.php3.27 ▲0.0438.01 ▲4.10
Docs /wp-admin/edit.php?post_type=clktusg_ultra_slider&page=wkmpallery-doc-page3.2630.08
All Sliders /wp-admin/edit.php?post_type=clktusg_ultra_slider3.2836.29
Add Slider /wp-admin/post-new.php?post_type=clktusg_ultra_slider3.5147.84

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultra Responsive Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11313.15 ▼1.232.18 ▲0.2742.41 ▼0.81
Dashboard /wp-admin2,249 ▲465.87 ▲0.99111.55 ▲6.4444.35 ▲1.85
Posts /wp-admin/edit.php2,131 ▲312.06 ▲0.0939.09 ▼0.6836.99 ▼0.32
Add New Post /wp-admin/post-new.php1,571 ▲1223.13 ▲4.99604.12 ▼31.5357.86 ▲3.91
Media Library /wp-admin/upload.php1,431 ▲344.27 ▲0.05101.38 ▼3.7848.86 ▲6.71
Docs /wp-admin/edit.php?post_type=clktusg_ultra_slider&page=wkmpallery-doc-page8972.0124.7433.03
All Sliders /wp-admin/edit.php?post_type=clktusg_ultra_slider1,0371.9930.4431.00
Add Slider /wp-admin/post-new.php?post_type=clktusg_ultra_slider2,3033.9973.76139.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=clktusg_ultra_slider
    • > Warning in wp-admin/includes/class-wp-list-table.php+1338
    array_keys() expects parameter 1 to be array, null given
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=clktusg_ultra_slider
    • > Warning in wp-admin/includes/class-wp-list-table.php+1383
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/edit.php?post_type=clktusg_ultra_slider
    • > Warning in wp-admin/includes/class-wp-list-table.php+1338
    array_intersect(): Expected parameter 1 to be an array, null given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=clktusg_ultra_slider
    • > Warning in wp-admin/includes/class-wp-list-table.php+1339
    count(): Parameter must be an array or an object that implements Countable

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ultra-responsive-slider/includes/Clkt-docs.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/ultra-responsive-slider/includes/Clkt-slider-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ultra-responsive-slider/includes/Clkt-shortcode.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultra-responsive-slider/Clkt-Main.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ultra-responsive-slider/template/single-clkt-ultra-slider.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultra-responsive-slider/includes/Clkt-ultra-slider.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (All Sliders), #2 (Slide Adding Page), #3 (Slider Setting Page), #4 (Full Width Slider Demo), #5 (Slider With Thumbnail), #6 (Slider Without Thumbnail)
Please take inspiration from this readme.txt

ultra-responsive-slider/Clkt-Main.php 85% from 13 tests

The main PHP file in "Ultra Responsive Slider" ver. 0.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: The principal plugin file should be the same as the plugin slug ("ultra-responsive-slider.php" instead of "Clkt-Main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin21,444 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS115111316,968
JavaScript67322193,399
PHP6175202789
SVG100288

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods29.52%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
css/new-slide.png2.54KB1.19KB▼ 53.21%
css/fotorama.png3.15KB3.22KB0.00%
css/fotorama@2x.png7.15KB7.53KB0.00%