78% responsive-accordion-slider

Code Review | Responsive Accordion Slider

WordPress plugin Responsive Accordion Slider scored78%from 54 tests.

About plugin

  • Plugin page: responsive-accord...
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Nov 9, 2023
  • Number of updates: 30
  • Update frequency: every 31.3 days
  • Top authors: techknowprime (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.41MB] [CPU: ▲1.00ms] Passed 4 tests

Analyzing server-side resources used by Responsive Accordion Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3737.40 ▼1.84
Dashboard /wp-admin3.75 ▲0.4449.07 ▲3.15
Posts /wp-admin/edit.php3.79 ▲0.4352.08 ▲3.55
Add New Post /wp-admin/post-new.php6.34 ▲0.4598.22 ▼0.85
Media Library /wp-admin/upload.php3.61 ▲0.3838.32 ▲3.53
All Accordions /wp-admin/edit.php?post_type=ras-accordion-slider3.6638.51
Help /wp-admin/edit.php?post_type=ras-accordion-slider&page=ras-premium3.6033.24
Add New /wp-admin/post-new.php?post_type=ras-accordion-slider3.7369.08

Server storage [IO: ▲4.54MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 112 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
ras-slider-images-default
widget_recent-posts
resp-accordion-slider-installDate
db_upgraded
theysaidso_admin_options
resp-accordion-slider-v
resp-accordion-slider-type
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Responsive Accordion Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12415.11 ▲0.991.48 ▼0.2831.20 ▼13.68
Dashboard /wp-admin2,291 ▲1146.22 ▲0.59134.72 ▲43.7544.55 ▲4.29
Posts /wp-admin/edit.php2,177 ▲773.80 ▲1.8487.15 ▲50.5437.26 ▲4.77
Add New Post /wp-admin/post-new.php1,600 ▲6224.71 ▼0.27639.40 ▲23.9032.24 ▼31.23
Media Library /wp-admin/upload.php1,596 ▲1935.76 ▲1.48138.44 ▲38.1040.20 ▼2.04
All Accordions /wp-admin/edit.php?post_type=ras-accordion-slider1,1493.7282.2429.63
Help /wp-admin/edit.php?post_type=ras-accordion-slider&page=ras-premium1,66810.33294.4689.96
Add New /wp-admin/post-new.php?post_type=ras-accordion-slider4,0276.95180.96128.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • resp-accordion-slider-type
    • db_upgraded
    • resp-accordion-slider-v
    • widget_recent-comments
    • resp-accordion-slider-installDate
    • can_compress_scripts
    • theysaidso_admin_options
    • ras-slider-images-default

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-1/index.php
    • > /wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php
  • 92× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: PostId in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 180
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 12
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 8
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 13
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-1/index.php on line 119
    • > PHP Notice
      Undefined variable: images in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-accordion-slider/includes/admin/class-ras-admin.php:15
    • > PHP Notice
      Undefined variable: PostId in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 116
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 11
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/responsive-accordion-slider/includes/public/designs/design-2/index.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: horizontal accordion, responsive accordion, responsive slider, accordion carousel, accordion slider...

responsive-accordion-slider/accordion-slider.php 92% from 13 tests

"Responsive Accordion Slider" version 1.1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("responsive-accordion-slider.php" instead of "accordion-slider.php")

Code Analysis Passed 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
There were no executable files found in this plugin28,767 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
CSS163,12410814,443
SVG60125,553
JavaScript135533882,539
PHP175704792,459
Sass1643341,903
LESS1641511,870

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.60
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods64
▷ Static methods812.50%
▷ Public methods4976.56%
▷ Protected methods34.69%
▷ Private methods1218.75%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/accordion-title-logo.png13.90KB5.99KB▼ 56.92%
assets/images/pro-tag.png2.84KB1.01KB▼ 64.49%
assets/images/accordion-icon.png10.56KB4.24KB▼ 59.86%