72% accordion-for-wp

Code Review | Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets

WordPress plugin Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets scored 72% from 54 tests.

About plugin

  • Plugin page: accordion-for-wp
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 5.9.2
  • First release: Aug 22, 2017
  • Latest release: Apr 3, 2018
  • Number of updates: 21
  • Update frequency: every 10.7 days
  • Top authors: themeegg (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 4,407 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.80MB] [CPU: ▼289.26ms] Passed 4 tests

This is a short check of server-side resources used by Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8258.28 ▲6.52
Dashboard /wp-admin4.19 ▲0.7940.57 ▲5.58
Posts /wp-admin/edit.php4.48 ▲0.8460.65 ▲6.49
Add New Post /wp-admin/post-new.php7.72 ▲0.7593.98 ▼1,175.64
Media Library /wp-admin/upload.php4.14 ▲0.8533.66 ▲7.49
Accordion group /wp-admin/edit-tags.php?taxonomy=accordion-group&post_type=accordion-for-wp4.1429.88
All Accordions /wp-admin/edit.php?post_type=accordion-for-wp4.1828.68
All Tabs /wp-admin/edit.php?post_type=afwp-tabs4.1830.93
Add New /wp-admin/post-new.php?post_type=accordion-for-wp4.4950.03
Shortcode Generator /wp-admin/edit.php?post_type=accordion-for-wp&page=afwp-shortcode-generator4.1166.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 68 new files
Database: no new tables, 5 new options
New WordPress options
widget_afwp_tab_widget
widget_afwp_term_tab_widget
widget_afwp_term_accordion_widget
widget_afwp_accordion_nav_menu
widget_afwp_accordion_widget

Browser metrics Passed 4 tests

Checking browser requirements for Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,991 ▲23316.45 ▲0.7710.00 ▲4.062.21 ▼0.83
Dashboard /wp-admin2,971 ▲1186.88 ▲0.66123.32 ▼3.52158.80 ▼6.58
Posts /wp-admin/edit.php2,782 ▲973.21 ▼0.0471.71 ▼4.19161.43 ▲15.49
Add New Post /wp-admin/post-new.php1,725 ▼2716.23 ▼4.83449.25 ▼40.30176.24 ▲14.53
Media Library /wp-admin/upload.php1,790 ▲925.92 ▲0.37132.23 ▼23.95191.28 ▼11.66
Accordion group /wp-admin/edit-tags.php?taxonomy=accordion-group&post_type=accordion-for-wp1,8003.4771.91114.67
All Accordions /wp-admin/edit.php?post_type=accordion-for-wp1,5203.5168.15178.49
All Tabs /wp-admin/edit.php?post_type=afwp-tabs1,5403.5166.83185.18
Add New /wp-admin/post-new.php?post_type=accordion-for-wp3,4629.88197.44254.86
Shortcode Generator /wp-admin/edit.php?post_type=accordion-for-wp&page=afwp-shortcode-generator12,2334.62228.93172.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 5 options in the database
    • widget_afwp_accordion_nav_menu
    • widget_afwp_term_accordion_widget
    • widget_afwp_accordion_widget
    • widget_afwp_tab_widget
    • widget_afwp_term_tab_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/accordion-for-wp/includes/posttype/index.php
    • > /wp-content/plugins/accordion-for-wp/includes/widgets/index.php
    • > /wp-content/plugins/accordion-for-wp/includes/shortcodes/index.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/accordion-for-wp/includes/optionpage/class-afwp-settings-page.php:244
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/accordion-for-wp/includes/optionpage/class-afwp-shortcode-generator.php:386

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=accordion-for-wp&page=afwp-shortcode-generator
    • > Network (severe)
    https://demo.themeegg.com/themes/eggnews/wp-content/themes/eggnews/screenshot.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit.php?post_type=accordion-for-wp&page=afwp-shortcode-generator
    • > Network (severe)
    https://demo.themeegg.com/themes/miteri/wp-content/themes/miteri/screenshot.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit.php?post_type=accordion-for-wp&page=afwp-shortcode-generator
    • > Network (severe)
    https://demo.themeegg.com/themes/education-master/wp-content/themes/education-master/screenshot.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #10, #11, #6, #7, #8, #9 in accordion-for-wp/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
Please take inspiration from this readme.txt

accordion-for-wp/accordion-for-wp.php Passed 13 tests

The entry point to "Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets" version 1.3.4 is a PHP file that has certain tags in its header comment area
77 characters long description:
Accordion for wordpress widgets and shortcode plugin with multiple templates.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected10,845 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP307451,1193,337
CSS670863,013
SVG1002,671
JavaScript410211,331
Sass12450493

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity18.82
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods146
▷ Static methods21.37%
▷ Public methods13995.21%
▷ Protected methods00.00%
▷ Private methods74.79%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin