56% responsive-slideshow

Code Review | Responsive slider / slideshow

WordPress plugin Responsive slider / slideshow scored56%from 54 tests.

About plugin

  • Plugin page: responsive-slideshow
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 22, 2014
  • Latest release: Mar 2, 2018
  • Number of updates: 25
  • Update frequency: every 52.8 days
  • Top authors: subhansanjaya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /19,638 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.72MB] [CPU: ▼40.45ms] Passed 4 tests

An overview of server-side resources used by Responsive slider / slideshow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.24 ▼0.2218.23 ▼23.67
Dashboard /wp-admin3.29 ▼0.0119.58 ▼34.07
Posts /wp-admin/edit.php3.29 ▼0.0720.49 ▼26.35
Add New Post /wp-admin/post-new.php3.29 ▼2.6019.57 ▼77.69
Media Library /wp-admin/upload.php3.29 ▲0.0618.23 ▼19.11
Add New /wp-admin/post-new.php?post_type=wa_rs_slider3.2919.84
Slideshow /wp-admin/edit.php?post_type=wa_rs_slider3.2923.57
Responsive Slideshw /wp-admin/options-general.php?page=responsive-slideshow3.2918.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
responsive_slideshow_version
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Responsive slider / slideshow
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,093 ▲33215.09 ▲0.577.77 ▲6.1241.95 ▲1.75
Dashboard /wp-admin2,376 ▲1966.33 ▲0.74107.70 ▲8.7338.97 ▼2.52
Posts /wp-admin/edit.php2,307 ▲2073.51 ▲1.5355.10 ▲18.5934.45 ▼3.29
Add New Post /wp-admin/post-new.php1,594 ▲6623.23 ▼0.03632.59 ▼19.0534.96 ▼24.89
Media Library /wp-admin/upload.php1,444 ▲414.35 ▲0.1783.32 ▼20.8845.15 ▲1.58
Add New /wp-admin/post-new.php?post_type=wa_rs_slider1,9634.3893.4350.61
Slideshow /wp-admin/edit.php?post_type=wa_rs_slider1,2993.4245.4227.37
Responsive Slideshw /wp-admin/options-general.php?page=responsive-slideshow1,3603.2642.2165.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/responsive-slideshow/inc/metaboxes/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • responsive_slideshow_version
    • db_upgraded

Smoke tests 0% 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
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=responsive-slideshow
    • > Warning in wp-content/plugins/responsive-slideshow/inc/metaboxes/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=responsive-slideshow
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/options-general.php?page=responsive-slideshow
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=responsive-slideshow
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/responsive-slideshow/inc/metaboxes/tests/phpunit/includes/bootstrap.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/responsive-slideshow/inc/metaboxes/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/responsive-slideshow/responsive-slideshow.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/responsive-slideshow/inc/metaboxes/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/responsive-slideshow/inc/metaboxes/example-functions.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=wa_rs_slider
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=responsive-slideshow
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (http://www.backraw.com/plugins/rs/images/screenshot-1.jpg), #2 (http://www.backraw.com/plugins/rs/images/screenshot-2.jpg)
  • Tags: You are using too many tags: 97 tag instead of maximum 10
Please take inspiration from this readme.txt

responsive-slideshow/responsive-slideshow.php Passed 13 tests

"Responsive slider / slideshow" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Simple & lightweight responsive slider plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin8,072 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript116336574,054
PHP116261,1082,475
CSS5132571,150
Markdown2800268
Bourne Shell115459
JSON10031
YAML15018
XML10117

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity54.88
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods160
▷ Static methods3421.25%
▷ Public methods15898.75%
▷ Protected methods21.25%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
20 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wa_left.png3.22KB0.14KB▼ 95.78%
assets/images/wa_right.png3.22KB0.13KB▼ 95.93%
inc/metaboxes/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
inc/metaboxes/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
assets/images/wps-pro.png11.33KB5.58KB▼ 50.75%