73% a3-responsive-slider

Code Review | a3 Responsive Slider

WordPress plugin a3 Responsive Slider scored73%from 54 tests.

About plugin

  • Plugin page: a3-responsive-slider
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 7, 2014
  • Latest release: Nov 23, 2023
  • Number of updates: 115
  • Update frequency: every 30.3 days
  • Top authors: a3rev (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /65,051 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.96MB] [CPU: ▲20.68ms] Passed 4 tests

This is a short check of server-side resources used by a3 Responsive Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.44 ▲4.9761.61 ▲20.89
Dashboard /wp-admin8.26 ▲4.9570.86 ▲18.97
Posts /wp-admin/edit.php8.40 ▲5.0478.50 ▲30.52
Add New Post /wp-admin/post-new.php10.84 ▲4.95106.76 ▲16.71
Media Library /wp-admin/upload.php8.20 ▲4.9762.93 ▲26.13
Slider Skins /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-skins8.52111.19
Widget Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-widget8.5169.96
All Sliders /wp-admin/edit.php?post_type=a3_slider8.5465.78
Add New Slider /wp-admin/post-new.php?post_type=a3_slider8.6876.97
Folders /wp-admin/edit-tags.php?taxonomy=slider_folder&post_type=a3_slider8.2071.75
Card Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-card-skin8.5174.33
Touch Mobile Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-mobile8.5162.85

Server storage [IO: ▲2.97MB] [DB: ▲0.09MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 247 new files
Database: 1 new table, 51 new options
New tables
wp_a3_rslider_images
New WordPress options
a3_rslider_template2_control_settings
a3_rslider_template_widget_dimensions_settings
a3rev_rslider_version
a3_rslider_template1_pager_settings
a3_rslider_template1_title_settings
a3_rslider_template_card_title_settings
a3_rslider_template1_control_settings
a3_rslider_template2_title_settings
a3_rslider_template_widget_global_settings
a3_rslider_template_widget_readmore_settings
...

Browser metrics 75% from 4 tests

This is an overview of browser requirements for a3 Responsive Slider
You may want to improve the following
  • Nodes: For the best user experience, please reduce the number of DOM nodes under 25,000 (currently 40,562 on /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-skins)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9714.14 ▼0.201.61 ▼0.2737.91 ▼5.71
Dashboard /wp-admin2,249 ▲695.63 ▼0.0394.12 ▼14.1842.36 ▼1.30
Posts /wp-admin/edit.php2,154 ▲572.03 ▲0.0740.67 ▲1.1738.16 ▲1.17
Add New Post /wp-admin/post-new.php1,793 ▲26023.35 ▲0.12608.03 ▲14.7950.13 ▲2.24
Media Library /wp-admin/upload.php1,454 ▲574.19 ▲0.0099.66 ▼6.2244.52 ▼0.94
Slider Skins /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-skins40,5628.94628.68245.30
Widget Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-widget1,2693.6773.3489.00
All Sliders /wp-admin/edit.php?post_type=a3_slider1,2372.1337.3532.27
Add New Slider /wp-admin/post-new.php?post_type=a3_slider4,5239.00240.2282.90
Folders /wp-admin/edit-tags.php?taxonomy=slider_folder&post_type=a3_slider1,3282.1227.2329.28
Card Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-card-skin1,3393.6459.3097.86
Touch Mobile Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-mobile3,0045.16108.2785.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_a3_rslider_images
  • This plugin did not uninstall successfully, leaving 50 options in the database
    • a3_rslider_template1_readmore_settings
    • a3_rslider_template_card_global_settings
    • a3_rslider_template_widget_dimensions_settings
    • widget_theysaidso_widget
    • a3_rslider_template_mobile_title_settings
    • db_upgraded
    • a3rev_rslider_version
    • a3_responsive_slider_style_version
    • a3_rslider_template_2
    • a3_rslider_template_widget_slider_styles_settings
    • ...

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/a3-responsive-slider/a3_responsive_slider.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/a3-responsive-slider/includes/customized_style.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a3-responsive-slider/admin/a3-rslider-admin.php:37

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: image gallery, wordpress image slider, responsive slider, responsive image slider

a3-responsive-slider/a3_responsive_slider.php 85% from 13 tests

The primary PHP file in "a3 Responsive Slider" version 2.3.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("a3-responsive-slider.php" instead of "a3_responsive_slider.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected53,506 lines of code in 184 files:
LanguageFilesBlank linesComment linesLines of code
PHP1025,5377,52120,193
JavaScript462,3281,56714,264
JSON10013,203
CSS223161553,693
LESS686281,070
PO File14521,240981
SVG55073
HTML12029

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 410)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity27.32
▷ Minimum class complexity1.00
▷ Maximum class complexity801.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity410.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes94
▷ Abstract classes00.00%
▷ Concrete classes94100.00%
▷ Final classes00.00%
Methods952
▷ Static methods767.98%
▷ Public methods78182.04%
▷ Protected methods14315.02%
▷ Private methods282.94%
Functions74
▷ Named functions7297.30%
▷ Anonymous functions22.70%
Constants29
▷ Global constants1551.72%
▷ Class constants1448.28%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
34 PNG files occupy 0.22MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/follow-twitter.png4.04KB2.07KB▼ 48.62%
admin/assets/js/chosen/chosen-sprite.png0.53KB0.88KB0.00%
admin/assets/images/slider-container-start-disable.png1.53KB0.56KB▼ 63.40%
admin/assets/images/ico-preview.png1.11KB0.36KB▼ 67.28%
admin/assets/images/slider-container-end-disable.png1.59KB0.55KB▼ 65.24%