83% accordion-slider-gallery

Code Review | Accordion Slider Gallery

WordPress plugin Accordion Slider Gallery scored83%from 54 tests.

About plugin

  • Plugin page: accordion-slider-...
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 11, 2020
  • Latest release: Nov 22, 2023
  • Number of updates: 27
  • Update frequency: every 45.6 days
  • Top authors: wpdiscover (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /41,035 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▲0.09ms] 75% from 4 tests

Analyzing server-side resources used by Accordion Slider Gallery
Please take the time to fix the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 509.79ms on /wp-admin/edit.php?post_type=accordion_slider&page=asg-dashboard)
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3439.34 ▼0.37
Dashboard /wp-admin3.72 ▲0.4150.79 ▼1.37
Posts /wp-admin/edit.php3.76 ▲0.4050.18 ▲2.06
Add New Post /wp-admin/post-new.php6.29 ▲0.4094.49 ▲0.02
Media Library /wp-admin/upload.php3.58 ▲0.3440.81 ▲4.43
Add New /wp-admin/post-new.php?post_type=accordion_slider3.7755.35
Documentation /wp-admin/edit.php?post_type=accordion_slider&page=asg-designs3.5635.48
All Accordion /wp-admin/edit.php?post_type=accordion_slider3.6336.79
Install Popular Plugins From WPdiscover /wp-admin/edit.php?post_type=accordion_slider&page=asg-dashboard3.64509.79
Upgrade To Premium /wp-admin/edit.php?post_type=accordion_slider&page=asg-premium3.5632.51

Server storage [IO: ▲3.89MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 113 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
accordion-slider-v
can_compress_scripts
widget_recent-comments
rpg-slider-images-default
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
asg_cns_review
accordion-slider-installDate
...

Browser metrics Passed 4 tests

Accordion Slider Gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲18813.78 ▼0.937.43 ▲5.7838.90 ▼4.39
Dashboard /wp-admin2,247 ▲675.61 ▼0.0896.70 ▲3.1042.73 ▼3.38
Posts /wp-admin/edit.php2,150 ▲502.00 ▲0.0340.99 ▲2.1235.38 ▲2.48
Add New Post /wp-admin/post-new.php1,569 ▲3423.63 ▲5.35710.12 ▲54.7266.00 ▲4.98
Media Library /wp-admin/upload.php1,549 ▲1464.42 ▲0.18113.43 ▲8.2447.78 ▲4.29
Add New /wp-admin/post-new.php?post_type=accordion_slider3,2785.89155.0579.43
Documentation /wp-admin/edit.php?post_type=accordion_slider&page=asg-designs1,1312.0023.5735.16
All Accordion /wp-admin/edit.php?post_type=accordion_slider1,1221.9032.1329.53
Install Popular Plugins From WPdiscover /wp-admin/edit.php?post_type=accordion_slider&page=asg-dashboard1,6282.0024.8330.14
Upgrade To Premium /wp-admin/edit.php?post_type=accordion_slider&page=asg-premium1,3092.0027.4952.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • asg_cns_review
    • db_upgraded
    • accordion-slider-type
    • can_compress_scripts
    • accordion-slider-v
    • accordion-slider-installDate
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require(ACCORDION_SLIDER_LIBRARIESclass-gamajo-template-loader.php): failed to open stream: No such file or directory in wp-content/plugins/accordion-slider-gallery/includes/libraries/class-accordion-slider-template-loader.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/accordion-slider-gallery/includes/admin/accordion-slider-js-templates.php:3
    • > PHP Fatal error
      require(): Failed opening required 'ACCORDION_SLIDER_LIBRARIESclass-gamajo-template-loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/accordion-slider-gallery/includes/libraries/class-accordion-slider-template-loader.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Accordion_Slider_Template_Loader' not found in wp-content/plugins/accordion-slider-gallery/includes/public/class-accordion-slider-shortcode.php:13
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/accordion-slider-gallery/default_image.php on line 16
    • > PHP Warning
      Use of undefined constant ACCORDION_SLIDER_IMAGES - assumed 'ACCORDION_SLIDER_IMAGES' (this will throw an Error in a future version of PHP) in wp-content/plugins/accordion-slider-gallery/default_image.php on line 4
    • > PHP Warning
      include(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/accordion-slider-gallery/default_image.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-slider-gallery/includes/admin/class-accordion-slider-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/accordion-slider-gallery/includes/public/templates/design/accordion-slider/accordion-slider.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/accordion-slider-gallery/accordion-slider.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "#"
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6 in accordion-slider-gallery/assets to your readme.txt
The official readme.txt might help

accordion-slider-gallery/accordion-slider.php 85% from 13 tests

The primary PHP file in "Accordion Slider Gallery" version 2.7 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("accordion-slider-gallery.php" instead of "accordion-slider.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin19,377 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
SVG50135,563
CSS151,9551355,315
PHP186155352,473
JavaScript115262552,253
Sass1643341,903
LESS1641511,870

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity19.20
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods61
▷ Static methods813.11%
▷ Public methods4777.05%
▷ Protected methods34.92%
▷ Private methods1118.03%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/prev.png1.33KB1.59KB0.00%
assets/images/next.png1.32KB1.58KB0.00%
assets/images/close.png0.27KB0.29KB0.00%
assets/images/icon-128x128.png9.10KB3.85KB▼ 57.70%
assets/images/sprites.png0.41KB0.44KB0.00%