73% advanced-accordion-block

Code Review | Advanced Accordion Gutenberg Block

WordPress plugin Advanced Accordion Gutenberg Block scored73%from 54 tests.

About plugin

  • Plugin page: advanced-accordio...
  • Plugin version: 4.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 20, 2021
  • Latest release: May 21, 2023
  • Number of updates: 31
  • Update frequency: every 25.6 days
  • Top authors: binsaifullah (74.19%)spiderdevs (29.03%)

Code review

54 tests

User reviews

16 reviews

Install metrics

3,000+ active /14,976 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.63MB] [CPU: ▲20.56ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Accordion Gutenberg Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.48 ▲5.0260.71 ▲19.91
Dashboard /wp-admin8.50 ▲5.1970.33 ▲21.48
Posts /wp-admin/edit.php8.50 ▲5.1462.03 ▲18.36
Add New Post /wp-admin/post-new.php9.06 ▲3.17106.84 ▲22.48
Media Library /wp-admin/upload.php8.50 ▲5.2761.23 ▲29.03
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5050.19
Accordion Block /wp-admin/options-general.php?page=advanced-accordion-block8.5053.43

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 211 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
fs_gdpr
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
fs_active_plugins
fs_debug_mode
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Accordion Gutenberg Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲16613.82 ▼0.728.42 ▲6.5530.83 ▼13.23
Dashboard /wp-admin2,210 ▲335.56 ▼0.0196.43 ▼1.0644.85 ▲1.49
Posts /wp-admin/edit.php2,128 ▲312.00 ▲0.0335.47 ▼1.0233.07 ▼1.85
Add New Post /wp-admin/post-new.php6,401 ▲4,87522.73 ▼0.90867.51 ▲179.1236.80 ▼17.47
Media Library /wp-admin/upload.php1,424 ▲214.22 ▲0.0297.32 ▲0.5643.48 ▼1.85
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0611.6924.6928.69
Accordion Block /wp-admin/options-general.php?page=advanced-accordion-block9892.0525.2353.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/advanced-accordion-block/admin/fs/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • fs_gdpr
    • fs_accounts
    • can_compress_scripts
    • fs_debug_mode
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_active_plugins

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
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-accordion-block/admin/admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: Please take inspiration from this readme.txt

advanced-accordion-block/advanced-accordion-block.php 77% from 13 tests

"Advanced Accordion Gutenberg Block" version 4.6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 168 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("5.6" instead of "5.7")
  • Requires PHP: Required version must match the one declared in readme.txt ("7.4" instead of "7.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected34,401 lines of code in 168 files:
LanguageFilesBlank linesComment linesLines of code
PHP1137,26916,14230,520
JavaScript24771191,671
CSS171501131,338
JSON800521
Markdown1680214
Sass51113137

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity86.64
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes12.22%
Methods1,147
▷ Static methods17415.17%
▷ Public methods80670.27%
▷ Protected methods151.31%
▷ Private methods32628.42%
Functions94
▷ Named functions94100.00%
▷ Anonymous functions00.00%
Constants126
▷ Global constants10180.16%
▷ Class constants2519.84%
▷ Public constants25100.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/fs/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/fs/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/fs/assets/img/advanced-accordion-block.png4.97KB1.83KB▼ 63.15%
admin/fs/assets/img/eazydocs.png2.71KB1.41KB▼ 48.16%