94% accordion-toggle

Code Review | Accordion Toggle

WordPress plugin Accordion Toggle scored 94% from 54 tests.

About plugin

  • Plugin page: accordion-toggle
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 5.9.2
  • First release: Jul 23, 2020
  • Latest release: Feb 8, 2022
  • Number of updates: 19
  • Update frequency: every 29.7 days
  • Top authors: alam789 (78.95%)re_enter_rupok (21.05%)wpdevteam (10.53%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 7,586 total downloads

Benchmarks

Plugin footprint Passed 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: ▲0.06MB] [CPU: ▼240.32ms] Passed 4 tests

Server-side resources used by Accordion Toggle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1554.27 ▼5.12
Dashboard /wp-admin3.50 ▲0.0933.88 ▲0.95
Posts /wp-admin/edit.php3.72 ▲0.0837.54 ▲1.50
Add New Post /wp-admin/post-new.php7.00 ▼0.00298.10 ▼958.62
Media Library /wp-admin/upload.php3.37 ▲0.0828.98 ▲2.95

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Accordion Toggle
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲2516.16 ▲0.156.14 ▼0.052.12 ▼0.27
Dashboard /wp-admin2,888 ▲376.16 ▼0.06125.87 ▼8.91158.23 ▼1.62
Posts /wp-admin/edit.php2,688 ▼63.24 ▼0.0062.62 ▼0.89149.11 ▲7.38
Add New Post /wp-admin/post-new.php1,793 ▲10322.88 ▲1.21518.00 ▲84.92157.22 ▲10.75
Media Library /wp-admin/upload.php1,698 ▼35.52 ▲0.00141.37 ▲0.72193.60 ▲9.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/accordion-toggle/accordion-toggle.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: gutenberg, faqs, collapse, faq, block...

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

The main PHP script in "Accordion Toggle" version 1.1.0 is automatically included on every request by WordPress
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 a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin16,661 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
SVG501211,462
CSS52404,768
PHP97082413
JSON20014
JavaScript4004

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.25
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods14
▷ Static methods321.43%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin