10% simple-responsive-slider

Code Review | Simple Responsive Slider

WordPress plugin Simple Responsive Slider scored10%from 54 tests.

About plugin

  • Plugin page: simple-responsive...
  • Plugin version: 0.2.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2013
  • Latest release: Apr 15, 2015
  • Number of updates: 112
  • Update frequency: every 5.1 days
  • Top authors: marcelotorres (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

3,000+ active /75,504 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/simple-responsive-slider/simple-responsive-slider-admin.php+58
    Undefined variable: wp_version

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

This is a short check of server-side resources used by Simple Responsive Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0421.69 ▼17.59
Dashboard /wp-admin3.37 ▲0.0745.58 ▼2.45
Posts /wp-admin/edit.php3.42 ▲0.0747.40 ▲3.11
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.24 ▲8.73
Media Library /wp-admin/upload.php3.29 ▲0.0635.74 ▼2.83
Simple Responsive Slider /wp-admin/themes.php?page=simple-responsive-slider3.2633.47

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Responsive Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲18014.04 ▼0.345.46 ▲3.7043.00 ▼5.91
Dashboard /wp-admin2,207 ▲195.95 ▲0.1595.70 ▼20.1538.41 ▼7.91
Posts /wp-admin/edit.php2,090 ▲42.01 ▼0.0239.31 ▲5.6933.82 ▲0.00
Add New Post /wp-admin/post-new.php1,517 ▼417.58 ▼3.53630.07 ▼70.5747.86 ▼8.74
Media Library /wp-admin/upload.php1,392 ▲14.15 ▼0.0793.78 ▼8.1741.54 ▼3.95
Simple Responsive Slider /wp-admin/themes.php?page=simple-responsive-slider1,0183.4156.2427.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_simpleresponsiveslider_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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
    • > GET request to /wp-admin/themes.php?page=simple-responsive-slider
    • > 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/themes.php?page=simple-responsive-slider
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/simple-responsive-slider/uninstall.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-responsive-slider/classes/widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Slides edit.), #2 (Image crop.), #3 (Slider settings.), #4 (Simple Responsive Slider in action!)
The official readme.txt is a good inspiration

simple-responsive-slider/simple-responsive-slider.php 92% from 13 tests

The entry point to "Simple Responsive Slider" version 0.2.2.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 409 characters long)

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
No dangerous file extensions were detected1,656 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP5169284763
JavaScript35990350
CSS3253297
PO File2102623246

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity28.67
▷ Minimum class complexity3.00
▷ Maximum class complexity58.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2385.19%
▷ Protected methods311.11%
▷ Private methods13.70%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
6 PNG files occupy 1.69MB with 0.98MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png65.46KB25.05KB▼ 61.73%
assets/images/sprite.png1.98KB0.97KB▼ 50.84%
screenshot-2.png793.62KB215.83KB▼ 72.80%
screenshot-4.png788.77KB245.66KB▼ 68.85%
assets/css/images/bg.png49.85KB32.04KB▼ 35.72%