83% simple-responsive-image-slider

Code Review | Simple Responsive Image Slider

WordPress plugin Simple Responsive Image Slider scored83%from 54 tests.

About plugin

  • Plugin page: simple-responsive...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 6, 2017
  • Latest release: Mar 6, 2017
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: rakib3784 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲2.24ms] Passed 4 tests

Analyzing server-side resources used by Simple Responsive Image Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.50 ▲3.93
Dashboard /wp-admin3.32 ▲0.0243.84 ▼1.19
Posts /wp-admin/edit.php3.37 ▲0.0248.23 ▲4.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.18 ▲11.64
Media Library /wp-admin/upload.php3.25 ▲0.0236.48 ▲1.72
All Sliders /wp-admin/edit.php?post_type=slider3.2934.17
Add New /wp-admin/post-new.php?post_type=slider3.3043.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Responsive Image Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲20513.55 ▼0.828.18 ▲6.2535.76 ▼6.73
Dashboard /wp-admin2,233 ▲454.87 ▼0.00109.06 ▼7.5842.45 ▼1.78
Posts /wp-admin/edit.php2,116 ▲242.01 ▼0.0141.88 ▲5.1234.58 ▲4.51
Add New Post /wp-admin/post-new.php1,556 ▲2723.43 ▲5.13616.56 ▼44.7657.22 ▲1.14
Media Library /wp-admin/upload.php1,409 ▲244.22 ▲0.04100.48 ▼4.0344.27 ▼3.37
All Sliders /wp-admin/edit.php?post_type=slider1,0862.0130.3027.98
Add New /wp-admin/post-new.php?post_type=slider1,6243.9959.5732.22

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-responsive-image-slider/simple-responsive-image-slider.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
  • Screenshots: Add images for these screenshots: #1 (After installing the plugin "Responsive Slider" will appear in your dashboard.), #2 (Clicking in "Add New" following window will appear.Give a name of the first slider.), #3 (Set featured image for every slider from media section or upload from your computer.), #4 (Click in "Publish" button.Repeat 2,3 and 4 for every slider.), #5 (Add the shortcode "responsive-slider" in any post or page or wherever you want to add.), #6 (Finally the slider will appear after publishing the post or page like this.)
  • Plugin Name: You should set the name of your plugin on the first line ( === simple-responsive-image-slider === )
You can look at the official readme.txt

simple-responsive-image-slider/simple-responsive-image-slider.php Passed 13 tests

"Simple Responsive Image Slider" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
89 characters long description:
This is a very simple responsive image Slider plugin.Usage of this plugin is very simple.

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 detected1,216 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2955141,001
CSS1013163
PHP1241052

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/controls.png2.74KB1.42KB▼ 48.29%