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: 6.3.1
  • 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,956 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.14MB] [CPU: ▼3.44ms] Passed 4 tests

An overview of server-side resources used by Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1534.09 ▼7.60
Dashboard /wp-admin3.44 ▲0.1447.56 ▼8.31
Posts /wp-admin/edit.php3.55 ▲0.2050.60 ▲2.30
Add New Post /wp-admin/post-new.php6.04 ▲0.1583.76 ▼0.13
Media Library /wp-admin/upload.php3.36 ▲0.1338.67 ▲6.34
Accordion group /wp-admin/edit-tags.php?taxonomy=accordion-group&post_type=accordion-for-wp3.3636.19
Shortcode Generator /wp-admin/edit.php?post_type=accordion-for-wp&page=afwp-shortcode-generator3.3328.38
All Tabs /wp-admin/edit.php?post_type=afwp-tabs3.4035.33
All Accordions /wp-admin/edit.php?post_type=accordion-for-wp3.4030.65
Add New /wp-admin/post-new.php?post_type=accordion-for-wp3.5152.48

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 68 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_afwp_accordion_nav_menu
widget_theysaidso_widget
widget_afwp_tab_widget
widget_afwp_term_tab_widget
db_upgraded
widget_afwp_term_accordion_widget
can_compress_scripts
widget_afwp_accordion_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20514.24 ▼0.156.44 ▲4.1038.28 ▼11.68
Dashboard /wp-admin2,271 ▲835.19 ▼0.71116.62 ▲4.2941.22 ▼4.26
Posts /wp-admin/edit.php2,165 ▲762.38 ▲0.3742.13 ▲6.0035.67 ▲0.29
Add New Post /wp-admin/post-new.php1,575 ▲4223.60 ▲0.52689.95 ▲3.7936.67 ▼28.04
Media Library /wp-admin/upload.php1,459 ▲684.45 ▲0.1999.06 ▼1.8643.43 ▼3.88
Accordion group /wp-admin/edit-tags.php?taxonomy=accordion-group&post_type=accordion-for-wp1,4062.1333.1728.19
Shortcode Generator /wp-admin/edit.php?post_type=accordion-for-wp&page=afwp-shortcode-generator11,4034.59183.9039.96
All Tabs /wp-admin/edit.php?post_type=afwp-tabs1,2012.3334.7830.71
All Accordions /wp-admin/edit.php?post_type=accordion-for-wp1,1882.3333.2928.84
Add New /wp-admin/post-new.php?post_type=accordion-for-wp2,6438.15168.9264.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_afwp_term_accordion_widget
    • widget_theysaidso_widget
    • widget_afwp_accordion_nav_menu
    • widget_afwp_tab_widget
    • widget_afwp_term_tab_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_afwp_accordion_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/accordion-for-wp/includes/shortcodes/index.php
    • > /wp-content/plugins/accordion-for-wp/includes/widgets/index.php
    • > /wp-content/plugins/accordion-for-wp/includes/posttype/index.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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
There are user-side issues you should fix
    • > 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: Please add descriptions for these screenshots #10, #11, #6, #7, #8, #9 in accordion-for-wp/assets to your readme.txt
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can look at the official readme.txt

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

"Accordion for WordPress - Accordion, FAQ, Tabs Shortcode and Widgets" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this 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

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin