61% wp-slider-forms

Code Review | WP Slider Forms

WordPress plugin WP Slider Forms scored61%from 54 tests.

About plugin

  • Plugin page: wp-slider-forms
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2013
  • Latest release: Jun 25, 2013
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mainuljs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /736 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.49ms] Passed 4 tests

A check of server-side resources used by WP Slider Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.50 ▼7.47
Dashboard /wp-admin3.32 ▼0.0249.01 ▼18.08
Posts /wp-admin/edit.php3.44 ▲0.0849.42 ▼0.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.22 ▼19.57
Media Library /wp-admin/upload.php3.25 ▲0.0242.08 ▲5.03
Banners /wp-admin/admin.php?page=banners3.2233.25
Members /wp-admin/admin.php?page=members3.2235.16
Instructions /wp-admin/admin.php?page=instructions3.2130.13
Add Banner /wp-admin/admin.php?page=banners_form3.1928.14

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: 2 new tables, 7 new options
New tables
wp_jss_sf_banners
wp_jss_sf_members
New WordPress options
theysaidso_admin_options
widget_recent-comments
jss_sf_db_version
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Slider Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7814.23 ▼0.381.66 ▼0.0741.46 ▲0.61
Dashboard /wp-admin2,224 ▲445.53 ▼0.1486.84 ▼8.0238.55 ▼4.01
Posts /wp-admin/edit.php2,132 ▲321.96 ▼0.0735.77 ▼4.4933.29 ▼5.90
Add New Post /wp-admin/post-new.php1,554 ▲2823.00 ▼0.61701.59 ▲8.9258.55 ▲0.40
Media Library /wp-admin/upload.php1,438 ▲414.19 ▼0.11107.30 ▲3.3545.83 ▼1.31
Banners /wp-admin/admin.php?page=banners1,0182.0425.3529.75
Members /wp-admin/admin.php?page=members9602.0124.8228.66
Instructions /wp-admin/admin.php?page=instructions8662.0323.5626.12
Add Banner /wp-admin/admin.php?page=banners_form9182.0430.5733.66

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
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_jss_sf_banners
    • wp_jss_sf_members
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • jss_sf_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=banners_form
    • > Notice in wp-content/plugins/wp-slider-forms/jss_sf_banners.php+299
    Undefined index: nonce

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× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-slider-forms/slider_forms_jolshiri.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-slider-forms/shortcodes.php:156
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-slider-forms/jss_sf_banners.php on line 13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-slider-forms/jss_sf_banners.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-slider-forms/jss_sf_members.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-slider-forms/jss_sf_banners.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: "www.jolshiri.com"
  • Screenshots: Add an image for screenshot #1 (Screenshot1 Admin area adding new banner.)
You can look at the official readme.txt

wp-slider-forms/slider_forms_jolshiri.php 85% from 13 tests

"WP Slider Forms" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-slider-forms.php" instead of "slider_forms_jolshiri.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 295 characters long)

Code Analysis 97% from 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 detected4,228 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP74772,6183,305
JavaScript167464780
CSS13321143

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 516)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity188.50
▷ Minimum class complexity3.00
▷ Maximum class complexity728.00
Average method complexity19.29
▷ Minimum method complexity1.00
▷ Maximum method complexity516.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jss_sf_screenshot_1.png14.88KB5.38KB▼ 63.83%
bxslider/images/controls.png2.74KB1.42KB▼ 48.29%