78% accordion-slider

Code Review | Accordion Slider

WordPress plugin Accordion Slider scored 78% from 54 tests.

About plugin

  • Plugin page: accordion-slider
  • Plugin version: 1.8.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 5.9.2
  • First release: Jul 27, 2021
  • Latest release: Jan 26, 2022
  • Number of updates: 8
  • Update frequency: every 22.9 days
  • Top authors: bqworks (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 4,081 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.70MB] [CPU: ▼301.94ms] Passed 4 tests

An overview of server-side resources used by Accordion Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.5761.19 ▲0.39
Dashboard /wp-admin4.14 ▲0.7338.94 ▼6.47
Posts /wp-admin/edit.php4.43 ▲0.7946.46 ▼48.07
Add New Post /wp-admin/post-new.php7.67 ▲0.7099.43 ▼1,153.60
Media Library /wp-admin/upload.php4.09 ▲0.7926.90 ▲0.91
Add New /wp-admin/admin.php?page=accordion-slider-new4.1535.10
All Accordions /wp-admin/admin.php?page=accordion-slider4.1371.92
Documentation /wp-admin/admin.php?page=accordion-slider-documentation4.1053.18
Plugin Settings /wp-admin/admin.php?page=accordion-slider-settings4.1158.08

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 102 new files
Database: 3 new tables, 2 new options
New tables
wp_accordionslider_panels
wp_accordionslider_layers
wp_accordionslider_accordions
New WordPress options
accordion_slider_version
widget_bqw-accordion-slider-widget

Browser metrics Passed 4 tests

A check of browser resources used by Accordion Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,806 ▲5815.18 ▼0.476.13 ▼0.392.49 ▲0.43
Dashboard /wp-admin2,936 ▲756.17 ▼0.05116.56 ▼31.65177.60 ▲10.08
Posts /wp-admin/edit.php2,716 ▲223.12 ▼0.2465.63 ▼1.38146.07 ▲0.12
Add New Post /wp-admin/post-new.php1,689 ▲2816.03 ▼6.72404.77 ▼44.18221.58 ▲70.57
Media Library /wp-admin/upload.php1,724 ▲265.50 ▼0.03128.79 ▼13.87213.76 ▲16.14
Add New /wp-admin/admin.php?page=accordion-slider-new3,3175.2779.64244.29
All Accordions /wp-admin/admin.php?page=accordion-slider1,4625.0878.03166.58
Documentation /wp-admin/admin.php?page=accordion-slider-documentation3,6835.3184.92200.36
Plugin Settings /wp-admin/admin.php?page=accordion-slider-settings1,5885.0976.41164.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_bqw-accordion-slider-widget

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/accordion-slider/admin/views/panel.php
    • > /wp-content/plugins/accordion-slider/admin/views/preview-window.php
  • 35× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accordion-slider/admin/views/layers-editor.php:12
    • > PHP Notice
      Undefined variable: panel_type in wp-content/plugins/accordion-slider/admin/views/panel.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'BQW_AS_Panel_Renderer' not found in wp-content/plugins/accordion-slider/public/class-dynamic-panel-renderer.php:7
    • > PHP Notice
      Undefined variable: panel_type in wp-content/plugins/accordion-slider/admin/views/panel.php on line 1
    • > PHP Notice
      Undefined variable: accordion_output in wp-content/plugins/accordion-slider/admin/views/preview-window.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'BQW_AS_Dynamic_Panel_Renderer' not found in wp-content/plugins/accordion-slider/public/class-gallery-panel-renderer.php:7
    • > PHP Notice
      Undefined variable: content_class in wp-content/plugins/accordion-slider/admin/views/background-image-editor.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accordion-slider/admin/views/breakpoint.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accordion-slider/admin/views/settings-editor.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accordion-slider/admin/views/posts-panel-settings.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: accordion slider, responsive slider, vertical accordion, accordion plugin, image accordion...

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

This is the main PHP file of "Accordion Slider" version 1.8.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Responsive and touch-enabled accordion slider.

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
There were no executable files found in this plugin19,349 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92,7942,4509,231
PHP448901,9355,011
CSS8473762,463
HTML115901,606
PO File1359458967
SVG10040
Markdown112031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.04
▷ Minimum class complexity2.00
▷ Maximum class complexity123.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods184
▷ Static methods2714.67%
▷ Public methods12065.22%
▷ Protected methods5529.89%
▷ Private methods94.89%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
21 PNG files occupy 0.50MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
documentation/assets/images/add-posts-panels.png14.38KB6.70KB▼ 53.45%
documentation/assets/images/add-flickr-panels.png14.36KB6.54KB▼ 54.42%
documentation/assets/images/add-gallery-panels.png14.32KB6.55KB▼ 54.23%
documentation/assets/images/layers-editor.png17.73KB7.57KB▼ 57.29%
documentation/assets/images/add-image-panels.png121.05KB43.27KB▼ 64.25%