84% accordion-toggle

Code Review | Accordion Toggle

WordPress plugin Accordion Toggle scored84%from 54 tests.

About plugin

  • Plugin page: accordion-toggle
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Mar 30, 2023
  • Number of updates: 30
  • Update frequency: every 32.7 days
  • Top authors: alam789 (50%)wpdevteam (43.33%)re_enter_rupok (13.33%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /28,371 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.29ms] Passed 4 tests

A check of server-side resources used by Accordion Toggle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.45 ▼0.85
Dashboard /wp-admin3.49 ▲0.1846.74 ▼3.44
Posts /wp-admin/edit.php3.61 ▲0.2547.25 ▲3.25
Add New Post /wp-admin/post-new.php6.09 ▲0.2081.30 ▼7.43
Media Library /wp-admin/upload.php3.41 ▲0.1834.74 ▼1.43

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Accordion Toggle: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.26 ▼0.982.10 ▲0.2242.61 ▼2.83
Dashboard /wp-admin2,209 ▲185.89 ▲0.97106.29 ▼8.1537.81 ▼9.74
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0236.43 ▼3.5533.41 ▼4.55
Add New Post /wp-admin/post-new.php1,652 ▲11924.42 ▲1.07683.33 ▼8.9737.25 ▼39.59
Media Library /wp-admin/upload.php1,382 ▲34.17 ▼0.0197.62 ▼9.1741.10 ▼2.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-toggle/blocks/accordion.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-toggle/blocks/accordion-item.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-toggle/includes/class-faq-schema.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: faq, collapse, accordions, gutenberg blocks, gutenberg...

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

This is the main PHP file of "Accordion Toggle" version 1.2.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
72 characters long description:
Display Your FAQs & Improve User Experience with Accordion/Toggle block.

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
No dangerous file extensions were detected17,282 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
SVG501211,462
CSS63464,769
PHP13143233928
JavaScript613796
JSON30027

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.71
Average class complexity33.14
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity5.90
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods44
▷ Static methods1534.09%
▷ Public methods3886.36%
▷ Protected methods00.00%
▷ Private methods613.64%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin