62% rg-slider

Code Review | RG Slider

WordPress plugin RG Slider scored62%from 54 tests.

About plugin

  • Plugin page: rg-slider
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5+
  • WordPress version: 6.3.1
  • First release: May 7, 2013
  • Latest release: Dec 2, 2013
  • Number of updates: 11
  • Update frequency: every 19.1 days
  • Top authors: Crinsane (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,910 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼5.29ms] Passed 4 tests

A check of server-side resources used by RG Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3042.40 ▲0.54
Dashboard /wp-admin3.59 ▲0.2452.06 ▼16.59
Posts /wp-admin/edit.php3.70 ▲0.3553.37 ▼1.07
Add New Post /wp-admin/post-new.php6.19 ▲0.3097.42 ▼4.04
Media Library /wp-admin/upload.php3.51 ▲0.2847.45 ▲9.01
RG Slider /wp-admin/admin.php?page=rg-slider3.4534.82
Crop Page /wp-admin/admin.php?page=rg-slider-crop-page3.4636.68
Options /wp-admin/admin.php?page=rg-slider-options3.4633.95

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
rg_slider_default
widget_theysaidso_widget
rg_slider_registered_options

Browser metrics Passed 4 tests

An overview of browser requirements for RG Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.21 ▼1.171.80 ▲0.2139.23 ▼2.66
Dashboard /wp-admin2,256 ▲564.90 ▼0.9598.74 ▼2.3638.29 ▼1.56
Posts /wp-admin/edit.php2,135 ▲352.05 ▼0.0141.86 ▲5.4236.05 ▲2.53
Add New Post /wp-admin/post-new.php1,561 ▲823.49 ▼0.22638.75 ▼26.3862.54 ▼16.74
Media Library /wp-admin/upload.php1,432 ▲354.22 ▲0.07101.29 ▼14.7143.43 ▼8.12
RG Slider /wp-admin/admin.php?page=rg-slider8732.0625.9131.02
Crop Page /wp-admin/admin.php?page=rg-slider-crop-page1,4515.76128.7262.36
Options /wp-admin/admin.php?page=rg-slider-options1,3472.2645.8932.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/rg-slider/rg-slider-helpers.php+18
    unlink(wp-content/uploads/rg-slider/.): Is a directory
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rg-slider-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rg-slider-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rg-slider-crop-page
    • > Notice in wp-content/plugins/rg-slider/rg-slider-croppage.php+93
    Undefined variable: slide_url
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rg-slider-crop-page
    • > Notice in wp-content/plugins/rg-slider/rg-slider-slide.php+400
    Trying to access array offset on value of type bool

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
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rg-slider/rg-slider-image.php
    • > /wp-content/plugins/rg-slider/rg-slider-slide.php
    • > /wp-content/plugins/rg-slider/rg-slider-listtable.php
    • > /wp-content/plugins/rg-slider/rg-slider-optionspage.php
    • > /wp-content/plugins/rg-slider/rg-slider-croppage.php
    • > /wp-content/plugins/rg-slider/rg-slider-posttype.php
    • > /wp-content/plugins/rg-slider/rg-slider-slideshow.php
    • > /wp-content/plugins/rg-slider/rg-slider-helpers.php
    • > /wp-content/plugins/rg-slider/rg-slider-mainpage.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rg-slider/rg-slider.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
  • Tested up to: Version not formatted correctly
You can take inspiration from this readme.txt

rg-slider/rg-slider.php Passed 13 tests

The principal PHP file in "RG Slider" v. 1.4.3 is loaded by WordPress automatically on each request
49 characters long description:
A jQuery slideshow on your website/blog made easy

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,363 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP104022271,307
JavaScript516034500
PO File2176180414
CSS36483
Stylus213059

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.78
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods47
▷ Static methods919.15%
▷ Public methods47100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screen-icon.png3.16KB0.50KB▼ 84.28%
assets/img/menu-icon.png1.41KB0.49KB▼ 65.02%