84% easy-accordion-block

Code Review | Easy Accordion Gutenberg Block

WordPress plugin Easy Accordion Gutenberg Block scored 84% from 54 tests.

About plugin

  • Plugin page: easy-accordion-block
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2.0
  • WordPress version: 6.3.1
  • First release: Sep 29, 2022
  • Latest release: May 10, 2023
  • Number of updates: 14
  • Update frequency: every 15.9 days
  • Top authors: binsaifullah (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 5,429 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.12MB] [CPU: ▼3.21ms] Passed 4 tests

An overview of server-side resources used by Easy Accordion Gutenberg Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.30 ▼2.60
Dashboard /wp-admin3.42 ▲0.1249.07 ▲2.51
Posts /wp-admin/edit.php3.47 ▲0.1248.19 ▲2.74
Add New Post /wp-admin/post-new.php6.01 ▲0.1383.36 ▼14.22
Media Library /wp-admin/upload.php3.34 ▲0.1236.89 ▲1.49
Easy Accordion /wp-admin/options-general.php?page=esab-accordion3.3129.16

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy Accordion Gutenberg Block: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲5013.20 ▼1.421.54 ▼0.4639.90 ▼6.29
Dashboard /wp-admin2,207 ▲165.83 ▲0.9796.82 ▼6.4839.59 ▼2.92
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0236.09 ▲1.3733.81 ▼1.58
Add New Post /wp-admin/post-new.php6,590 ▲5,06822.39 ▼0.821,020.93 ▲341.9463.92 ▲12.28
Media Library /wp-admin/upload.php1,386 ▲14.21 ▲0.0293.74 ▼4.7140.47 ▼1.13
Easy Accordion /wp-admin/options-general.php?page=esab-accordion1,5548.93297.2759.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-accordion-block/admin/class-esab-blocks.php:11

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: You can look at the official readme.txt

easy-accordion-block/plugin.php 92% from 13 tests

The main PHP file in "Easy Accordion Gutenberg Block" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-accordion-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,070 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP34382348
CSS4629317
JSON100299
JavaScript3519106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected