83% responsive-accordion-and-collapse

Code Review | Accordion FAQ - Compatible With All Page Builder (Elementor, Gutenberg)

WordPress plugin Accordion FAQ - Compatible With All Page Builder (Elementor, Gutenberg) scored83%from 54 tests.

About plugin

  • Plugin page: responsive-accord...
  • Plugin version: 2.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Nov 10, 2023
  • Number of updates: 102
  • Update frequency: every 27.9 days
  • Top authors: wpshopmart (100%)

Code review

54 tests

User reviews

638 reviews

Install metrics

50,000+ active /1,011,879 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Accordion FAQ - Compatible With All Page Builder (Elementor, Gutenberg)
Please take the time to fix the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 537.59ms on /wp-admin/post-new.php?post_type=responsive_accordion)
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.35 ▼1.01
Dashboard /wp-admin3.41 ▲0.0745.49 ▼16.34
Posts /wp-admin/edit.php3.53 ▲0.1748.07 ▼2.24
Add New Post /wp-admin/post-new.php6.00 ▲0.1180.57 ▼15.21
Media Library /wp-admin/upload.php3.34 ▲0.1131.93 ▼2.00
Add New Accordion /wp-admin/post-new.php?post_type=responsive_accordion3.70537.59
All Accordion /wp-admin/edit.php?post_type=responsive_accordion3.3844.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 131 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
wpsm_acc_r_review
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Accordion FAQ - Compatible With All Page Builder (Elementor, Gutenberg)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15513.85 ▼0.2911.19 ▲9.5843.86 ▼0.14
Dashboard /wp-admin2,219 ▲425.61 ▼0.0586.04 ▼14.6439.16 ▼6.16
Posts /wp-admin/edit.php2,124 ▲241.98 ▲0.0439.55 ▲1.9734.83 ▲1.21
Add New Post /wp-admin/post-new.php1,549 ▲1823.28 ▼0.01661.58 ▼23.9252.09 ▲0.84
Media Library /wp-admin/upload.php1,424 ▲274.18 ▼0.0095.68 ▼10.6440.62 ▼4.72
Add New Accordion /wp-admin/post-new.php?post_type=responsive_accordion7,89814.45633.00342.43
All Accordion /wp-admin/edit.php?post_type=responsive_accordion1,0961.9432.0129.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • wpsm_acc_r_review
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/responsive-accordion-and-collapse/lib/admin/add-ac-js-footer.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/responsive-accordion-and-collapse/lib/admin/help.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/responsive-accordion-and-collapse/front/ac-content.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/responsive-accordion-and-collapse/responsive-accordion.php:15
    • > PHP Notice
      Undefined variable: WPSM_AC_ID in wp-content/plugins/responsive-accordion-and-collapse/front/ac-content.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/responsive-accordion-and-collapse/lib/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/responsive-accordion-and-collapse/lib/admin/more-pro.php:116
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/responsive-accordion-and-collapse/front/style.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-accordion-and-collapse/lib/admin/menu.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-accordion-and-collapse/lib/installation/installation.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (36 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

responsive-accordion-and-collapse/responsive-accordion.php 85% from 13 tests

"Accordion FAQ - Compatible With All Page Builder (Elementor, Gutenberg)" version 2.4.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("responsive-accordion-and-collapse.php" instead of "responsive-accordion.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin14,631 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
CSS135891856,366
JavaScript86271762,858
PHP162471052,596
Sass1319221,158
LESS1319311,149
SVG100504

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
51 PNG files occupy 1.50MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
img/wpshopmart-logo.png25.28KB13.46KB▼ 46.76%
img/tabs-pro-screesnhot.png281.04KB97.61KB▼ 65.27%
css/images/ui-icons_d8e7f3_256x240.png4.44KB4.17KB▼ 6.02%
img/accordion-1.png20.86KB21.98KB0.00%