73% a3-responsive-slider

Code Review | a3 Responsive Slider

WordPress plugin a3 Responsive Slider scored 73% from 54 tests.

About plugin

  • Plugin page: a3-responsive-slider
  • Plugin version: 2.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 5.9.2
  • First release: May 7, 2014
  • Latest release: Jan 24, 2022
  • Number of updates: 100
  • Update frequency: every 28.2 days
  • Top authors: a3rev (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active / 60,308 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲4.88MB] [CPU: ▼284.03ms] Passed 4 tests

Analyzing server-side resources used by a3 Responsive Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.47 ▲4.9577.44 ▲26.03
Dashboard /wp-admin8.31 ▲4.9057.72 ▲23.25
Posts /wp-admin/edit.php8.56 ▲4.9257.34 ▲18.25
Add New Post /wp-admin/post-new.php11.77 ▲4.80112.82 ▼1,196.74
Media Library /wp-admin/upload.php8.19 ▲4.9043.36 ▲19.14
Add New Slider /wp-admin/post-new.php?post_type=a3_slider8.8471.93
All Sliders /wp-admin/edit.php?post_type=a3_slider8.5854.23
Folders /wp-admin/edit-tags.php?taxonomy=slider_folder&post_type=a3_slider8.1943.30
Touch Mobile Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-mobile8.5652.94
Card Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-card-skin8.5762.34
Slider Skins /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-skins8.5873.41
Widget Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-widget8.5749.15

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 257 new files
Database: 1 new table, 45 new options
New tables
wp_a3_rslider_images
New WordPress options
a3_rslider_template1_caption_settings
a3_rslider_template_2
a3_rslider_template_card_dimensions_settings
a3_rslider_template_widget_readmore_settings
a3_responsive_slider_style_version
a3_rslider_template_widget_global_settings
a3_rslider_template1_global_settings
a3_rslider_template_widget_title_settings
a3_rslider_template_mobile_pager_settings
a3_rslider_template1_readmore_settings
...

Browser metrics 75% from 4 tests

A check of browser resources used by a3 Responsive Slider
Please improve the following
  • Nodes: Limit the number of DOM nodes under 25,000 (currently 46,071 on /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-skins)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,849 ▲10515.68 ▼0.005.82 ▼0.333.26 ▲0.90
Dashboard /wp-admin2,944 ▲906.14 ▼0.05115.86 ▼17.25157.94 ▼5.84
Posts /wp-admin/edit.php2,757 ▲663.24 ▲0.0264.18 ▲0.09141.73 ▼2.66
Add New Post /wp-admin/post-new.php1,906 ▲24520.07 ▲3.43425.43 ▼13.36147.80 ▼8.70
Media Library /wp-admin/upload.php1,761 ▲635.54 ▲0.02161.11 ▲22.19196.68 ▲12.45
Add New Slider /wp-admin/post-new.php?post_type=a3_slider5,97611.93288.76199.26
All Sliders /wp-admin/edit.php?post_type=a3_slider1,5673.2161.03123.81
Folders /wp-admin/edit-tags.php?taxonomy=slider_folder&post_type=a3_slider1,6882.7856.99113.42
Touch Mobile Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-mobile3,7717.01137.09186.47
Card Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-card-skin1,7155.8298.34168.49
Slider Skins /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-skins46,0719.44564.32288.77
Widget Skin /wp-admin/edit.php?post_type=a3_slider&page=a3-rslider-template-widget1,6275.7381.76165.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_a3_rslider_images
  • Zombie WordPress options were found after uninstall: 44 options
    • a3_rslider_template_widget_readmore_settings
    • a3_rslider_template_widget_title_settings
    • a3_rslider_template_mobile_title_settings
    • a3_rslider_template1_dimensions_settings
    • a3rev_rslider_version
    • a3_rslider_template_widget_caption_settings
    • widget_a3_rslider_widget
    • a3_rslider_template_card_control_settings
    • a3_rslider_template_card_caption_settings
    • a3_rslider_template2_shortcode_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)
Good news, no errors were detected

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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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 plugin_basename() in wp-content/plugins/a3-responsive-slider/a3_responsive_slider.php:24
    • > 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 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: responsive slider, wordpress image slider, responsive image slider, image gallery

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

The principal PHP file in "a3 Responsive Slider" v. 2.0.13 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("a3-responsive-slider.php" instead of "a3_responsive_slider.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 216 characters long)

Code Analysis 97% from 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 detected56,378 lines of code in 190 files:
LanguageFilesBlank linesComment linesLines of code
PHP1025,5197,50820,081
JavaScript482,3421,60814,421
JSON10013,203
CSS253321705,865
LESS687281,070
PO File14521,240981
SVG650728
HTML12029

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 412)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity26.96
▷ Minimum class complexity1.00
▷ Maximum class complexity786.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity412.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes94
▷ Abstract classes00.00%
▷ Concrete classes94100.00%
▷ Final classes00.00%
Methods948
▷ Static methods768.02%
▷ Public methods78182.38%
▷ Protected methods14315.08%
▷ Private methods242.53%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 PNG files occupy 0.22MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/js/chosen/chosen-sprite.png0.53KB0.88KB0.00%
admin/assets/images/ico-delete.png0.13KB0.13KB0.00%
assets/images/free-woocommerce-plugins.png70.55KB26.85KB▼ 61.94%
assets/images/slide.png0.20KB0.16KB▼ 19.70%
admin/assets/images/play_video.png17.30KB9.38KB▼ 45.75%