78% smart-accordion

Code Review | Smart Accordion

WordPress plugin Smart Accordion scored78%from 54 tests.

About plugin

  • Plugin page: smart-accordion
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 12, 2018
  • Latest release: Nov 11, 2023
  • Number of updates: 10
  • Update frequency: every 200.9 days
  • Top authors: pickelements (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /923 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.04MB] [CPU: ▼2.41ms] Passed 4 tests

Server-side resources used by Smart Accordion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.54 ▲3.51
Dashboard /wp-admin3.36 ▲0.0145.89 ▼13.64
Posts /wp-admin/edit.php3.41 ▲0.0544.25 ▼1.62
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.07 ▲3.43
Media Library /wp-admin/upload.php3.28 ▲0.0538.08 ▲2.19
All Shortcode /wp-admin/edit.php?post_type=sfaccordioncode3.3240.37
Add New Accordion /wp-admin/post-new.php?post_type=smartaccordion3.4255.34
All Accordion /wp-admin/edit.php?post_type=smartaccordion3.2839.55
Accordion Categories /wp-admin/edit-tags.php?taxonomy=smartaccordion-tax&post_type=smartaccordion3.2834.99
Create Shortcode /wp-admin/post-new.php?post_type=sfaccordioncode3.3347.95

Server storage [IO: ▲1.50MB] [DB: ▲0.77MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Smart Accordion: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /7,620 ▲4,87314.85 ▲0.515.73 ▲3.9144.13 ▼0.71
Dashboard /wp-admin6,938 ▲4,7606.05 ▲0.35138.37 ▲24.1142.67 ▲3.51
Posts /wp-admin/edit.php6,848 ▲4,7452.25 ▲0.2385.00 ▲45.7035.76 ▲1.27
Add New Post /wp-admin/post-new.php3,928 ▲2,39223.75 ▲0.41724.23 ▲19.2234.59 ▼9.40
Media Library /wp-admin/upload.php6,137 ▲4,7374.06 ▼0.14138.32 ▲32.5244.01 ▼1.53
All Shortcode /wp-admin/edit.php?post_type=sfaccordioncode5,8092.1890.7729.60
Add New Accordion /wp-admin/post-new.php?post_type=smartaccordion6,9757.52229.7266.96
All Accordion /wp-admin/edit.php?post_type=smartaccordion5,8202.1477.5029.25
Accordion Categories /wp-admin/edit-tags.php?taxonomy=smartaccordion-tax&post_type=smartaccordion6,0252.7671.4129.14
Create Shortcode /wp-admin/post-new.php?post_type=sfaccordioncode7,5484.62129.0740.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=smartaccordion
    • > Notice in wp-content/plugins/smart-accordion/libs/post-types/smart-accordion-post-type.php+103
    Undefined index: order

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smart-accordion/smart-accordion.php

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: accordion, question, faq, accordion plugin, responsive accordions

smart-accordion/smart-accordion.php 92% from 13 tests

The principal PHP file in "Smart Accordion" v. 1.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)

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
No dangerous file extensions were detected1,964 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP616368908
SVG100565
JavaScript4112234278
CSS4417213

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.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
No PNG images were found in this plugin