83% b-accordion

Code Review | B Accordion - Add Horizontal / Vertical Accordion in WordPress

WordPress plugin B Accordion - Add Horizontal / Vertical Accordion in WordPress scored83%from 54 tests.

About plugin

  • Plugin page: b-accordion
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 16, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 17
  • Update frequency: every 29.9 days
  • Top authors: charlescormier (82.35%)abuhayat (23.53%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,355 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.62ms] Passed 4 tests

Analyzing server-side resources used by B Accordion - Add Horizontal / Vertical Accordion in WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.25 ▲1.98
Dashboard /wp-admin3.33 ▲0.0342.81 ▼9.50
Posts /wp-admin/edit.php3.38 ▲0.0254.92 ▲6.37
Add New Post /wp-admin/post-new.php5.94 ▲0.05105.92 ▲3.64
Media Library /wp-admin/upload.php3.25 ▲0.0238.56 ▲8.02

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for B Accordion - Add Horizontal / Vertical Accordion in WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲18614.24 ▼0.0714.95 ▲13.2143.71 ▼4.08
Dashboard /wp-admin2,206 ▲205.89 ▲0.99109.12 ▼13.9739.47 ▼12.59
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0246.33 ▲8.3239.58 ▲3.04
Add New Post /wp-admin/post-new.php6,594 ▲5,06622.39 ▲4.191,029.99 ▲413.2440.95 ▼16.14
Media Library /wp-admin/upload.php1,385 ▼04.22 ▲0.00113.50 ▲7.6649.06 ▲1.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant BAB_PLUGIN_VERSION - assumed 'BAB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/b-accordion/dist/editor.asset.php on line 3
    • > PHP Warning
      Use of undefined constant BAB_PLUGIN_VERSION - assumed 'BAB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/b-accordion/dist/script.asset.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

b-accordion/index.php 85% from 13 tests

"B Accordion - Add Horizontal / Vertical Accordion in WordPress" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("b-accordion.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin219 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JSON200119
PO File1214055
PHP3111340
JavaScript3023
CSS2022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin