94% accordion-blocks

Code Review | Accordion Blocks

WordPress plugin Accordion Blocks scored 94% from 54 tests.

About plugin

  • Plugin page: accordion-blocks
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9
  • WordPress version: 5.9.2
  • First release: Mar 12, 2019
  • Latest release: Feb 7, 2022
  • Number of updates: 43
  • Update frequency: every 26.7 days
  • Top authors: philbuchanan (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

10,000+ active / 117,124 total downloads


Plugin footprint Passed 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.05MB] [CPU: ▼300.45ms] Passed 4 tests

An overview of server-side resources used by Accordion Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.0953.86 ▼20.61
Dashboard /wp-admin3.51 ▲0.0734.05 ▼0.07
Posts /wp-admin/edit.php3.74 ▲0.0736.67 ▼0.57
Add New Post /wp-admin/post-new.php6.99 ▼0.0294.18 ▼1,178.52
Media Library /wp-admin/upload.php3.39 ▲0.0623.59 ▼2.10
Accordion Blocks /wp-admin/options-general.php?page=accordion_blocks_settings3.3624.63

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Accordion Blocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,911 ▲15716.13 ▲0.4210.39 ▲4.502.17 ▼0.23
Dashboard /wp-admin2,897 ▲366.11 ▼0.09117.97 ▼16.67159.32 ▼7.64
Posts /wp-admin/edit.php2,693 ▲23.24 ▲0.0164.06 ▼1.73138.16 ▼6.31
Add New Post /wp-admin/post-new.php1,675 ▼2216.64 ▼4.70428.84 ▼10.65160.35 ▼6.53
Media Library /wp-admin/upload.php1,703 ▲55.51 ▲0.01147.95 ▲9.92198.54 ▲10.26
Accordion Blocks /wp-admin/options-general.php?page=accordion_blocks_settings1,0442.4152.97126.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/accordion-blocks/accordion-blocks.php:34

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 issues were found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: block, gutenberg, accordions, accordion, responsive

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

The main file in "Accordion Blocks" v. 1.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Gutenberg blocks for creating responsive accordion drop-downs.

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
Everything looks great! No dangerous files found in this plugin417 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
▷ Named functions00.00%
▷ Anonymous functions2100.00%
▷ Global constants00.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
4 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png152.55KB58.72KB▼ 61.51%
assets/screenshot-2.png19.91KB9.84KB▼ 50.55%
assets/icon-256x256.png0.67KB0.15KB▼ 77.71%
assets/icon-128x128.png0.36KB0.13KB▼ 65.50%