94% accordion-shortcodes

Code Review | Accordion Shortcodes

WordPress plugin Accordion Shortcodes scored 94% from 54 tests.

About plugin

  • Plugin page: accordion-shortcodes
  • Plugin version: 2.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.1
  • WordPress version: 5.9.2
  • First release: Dec 30, 2013
  • Latest release: Mar 29, 2019
  • Number of updates: 71
  • Update frequency: every 27.0 days
  • Top authors: philbuchanan (100%)

Code review

54 tests

User reviews

68 reviews

Install metrics

10,000+ active / 216,606 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼294.99ms] Passed 4 tests

Analyzing server-side resources used by Accordion Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1055.78 ▲3.70
Dashboard /wp-admin3.48 ▲0.0734.72 ▼0.26
Posts /wp-admin/edit.php3.70 ▲0.0643.90 ▼7.73
Add New Post /wp-admin/post-new.php6.94 ▼0.0394.56 ▼1,174.05
Media Library /wp-admin/upload.php3.35 ▲0.0526.71 ▲2.08

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Accordion Shortcodes: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,798 ▲7616.01 ▲0.425.69 ▼1.032.65 ▲0.21
Dashboard /wp-admin2,891 ▲306.10 ▼0.17121.20 ▼18.77155.32 ▼16.86
Posts /wp-admin/edit.php2,694 ▲63.24 ▼0.1264.48 ▲0.12136.50 ▼0.80
Add New Post /wp-admin/post-new.php1,755 ▲10021.97 ▲1.06409.63 ▼22.16158.55 ▼0.83
Media Library /wp-admin/upload.php1,704 ▲65.49 ▲0.04140.08 ▼6.83191.32 ▲2.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The following issues need your attention
  • 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-shortcodes/accordion-shortcodes.php:87

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
9 plugin tags: accordions plugin jquery, accordions, accordions plugin wordpress, accordions short-code, accordions plugin...

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

The entry point to "Accordion Shortcodes" version 2.4.2 is a PHP file that has certain tags in its header comment area
56 characters long description:
Shortcodes for creating responsive accordion drop-downs.

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
Good job! No executable or dangerous file extensions detected512 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36058276
PHP2113125192
SVG20223
PO File12221

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.00
▷ Minimum class complexity6.00
▷ Maximum class complexity28.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
5 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png5.52KB3.08KB▼ 44.30%
assets/icon-256x256.png0.67KB0.15KB▼ 77.71%
assets/screenshot-3.png24.78KB8.90KB▼ 64.09%
assets/screenshot-2.png24.90KB8.19KB▼ 67.10%
assets/icon-128x128.png0.36KB0.13KB▼ 65.50%