84% accordion-blocks

Code Review | Accordion Blocks

WordPress plugin Accordion Blocks scored84%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: 6.3.1
  • 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

35 reviews

Install metrics

20,000+ active /160,013 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.06ms] Passed 4 tests

Server-side resources used by Accordion Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.67 ▼0.17
Dashboard /wp-admin3.37 ▲0.0345.05 ▼17.81
Posts /wp-admin/edit.php3.48 ▲0.1344.60 ▼7.38
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.87 ▼6.88
Media Library /wp-admin/upload.php3.29 ▲0.0634.61 ▲2.35
Accordion Blocks /wp-admin/options-general.php?page=accordion_blocks_settings3.2631.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Accordion Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14114.11 ▼0.485.37 ▲3.5437.93 ▼8.33
Dashboard /wp-admin2,210 ▲224.86 ▼1.05110.20 ▲2.9141.37 ▲1.53
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0440.02 ▲4.4534.53 ▲0.36
Add New Post /wp-admin/post-new.php6,355 ▲4,84127.59 ▲10.03830.92 ▲218.7952.06 ▲2.49
Media Library /wp-admin/upload.php1,389 ▲14.16 ▼0.02106.61 ▲6.7144.37 ▲1.24
Accordion Blocks /wp-admin/options-general.php?page=accordion_blocks_settings8062.0623.0327.75

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

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: accordion, block, gutenberg, accordions, 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin417 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP28283222
JavaScript363125147
JSON10046
CSS1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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/icon-128x128.png0.36KB0.13KB▼ 65.50%
assets/icon-256x256.png0.67KB0.15KB▼ 77.71%
assets/screenshot-1.png152.55KB58.72KB▼ 61.51%
assets/screenshot-2.png19.91KB9.84KB▼ 50.55%