10% fp-responsive-slider

Code Review | FP Responsive Slider

WordPress plugin FP Responsive Slider scored10%from 54 tests.

About plugin

  • Plugin page: fp-responsive-slider
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2013
  • Latest release: Jul 16, 2013
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: digontobd (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /4,648 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/fp-responsive-slider/fp_responsive_slider.php+300
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.09ms] Passed 4 tests

A check of server-side resources used by FP Responsive Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.80 ▼38.23
Dashboard /wp-admin2.05 ▼1.265.28 ▼44.49
Posts /wp-admin/edit.php2.05 ▼1.316.19 ▼44.54
Add New Post /wp-admin/post-new.php2.05 ▼3.845.01 ▼85.11
Media Library /wp-admin/upload.php2.05 ▼1.185.23 ▼32.43
FP RSlider /wp-admin/edit.php?post_type=fprslider2.055.04
FP Responsive Slider /wp-admin/tools.php?page=fp-responsive-slider2.055.69
Add New /wp-admin/post-new.php?post_type=fprslider2.055.65
FP RSlider Settings /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider2.056.44

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_fprsliderwidget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by FP Responsive Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲22213.61 ▼0.764.73 ▲2.8142.39 ▼2.61
Dashboard /wp-admin2,242 ▲575.84 ▼0.03101.25 ▼14.5438.02 ▼7.16
Posts /wp-admin/edit.php2,131 ▲392.03 ▲0.0341.85 ▲3.8237.45 ▲2.31
Add New Post /wp-admin/post-new.php1,550 ▲1723.23 ▲0.10633.86 ▼53.9957.32 ▼4.05
Media Library /wp-admin/upload.php1,424 ▲394.14 ▼0.06102.50 ▼5.7142.27 ▲0.32
FP RSlider /wp-admin/edit.php?post_type=fprslider1,1312.0134.7731.80
FP Responsive Slider /wp-admin/tools.php?page=fp-responsive-slider1,0972.0522.1641.49
Add New /wp-admin/post-new.php?post_type=fprslider2,2167.55175.0062.46
FP RSlider Settings /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider1,0962.0624.2535.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_fprsliderwidget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fprslider_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fprslider_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider
    • > Deprecated in wp-content/plugins/fp-responsive-slider/fp_responsive_slider.php+300
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in FprsliderWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=fprslider&page=fp-responsive-slider
    • > 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.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/fp-responsive-slider/fp_responsive_slider.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (View of Responsive view of slider.), #2 (View Full View of slider.), #3 (View Backend Settings page for shortcode/template code.), #4 (View Backend Settings for widget.)
The official readme.txt might help

fp-responsive-slider/fp_responsive_slider.php 85% from 13 tests

The main PHP script in "FP Responsive Slider" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 286 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("fp-responsive-slider.php" instead of "fp_responsive_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin552 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13524462
CSS16283
JavaScript1017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.66MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png16.66KB5.86KB▼ 64.81%
screenshot-3.png38.15KB13.66KB▼ 64.20%
images/fprslider-icon.png2.88KB1.58KB▼ 44.96%
screenshot-2.png457.01KB143.30KB▼ 68.65%
images/right.png3.72KB0.91KB▼ 75.49%