74% accordions-or-faqs

Code Review | Accordions - Multiple Accordions or FAQs Builder

WordPress plugin Accordions - Multiple Accordions or FAQs Builder scored 74% from 53 tests.

About plugin

  • Plugin page: accordions-or-faqs
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.8.1
  • First release: May 18, 2017
  • Latest release: Sep 8, 2021
  • Number of updates: 8
  • Update frequency: every 198.5 days
  • Top authors: biplob018 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

200+ active / 2,641 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼256.77ms] 75% from 4 tests

A check of server-side resources used by Accordions - Multiple Accordions or FAQs Builder
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,969.97ms on /wp-admin/admin.php?page=oxi-accordions-ultimate-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.04 ▲0.3232.66 ▲5.39
Dashboard /wp-admin3.34 ▲0.2948.92 ▲3.12
Posts /wp-admin/edit.php3.39 ▲0.2842.49 ▲2.89
Add New Post /wp-admin/post-new.php5.65 ▲0.2298.74 ▼1,029.13
Media Library /wp-admin/upload.php3.22 ▲0.2132.07 ▼3.97
Create New /wp-admin/admin.php?page=oxi-accordions-ultimate-new3.8446.45
Settings /wp-admin/admin.php?page=oxi-accordions-ultimate-settings3.3735.34
Shortcode /wp-admin/admin.php?page=oxi-accordions-ultimate3.3832.59
Oxilab Plugins /wp-admin/admin.php?page=oxi-accordions-ultimate-plugins3.431,969.97
Support /wp-admin/admin.php?page=oxi-accordions-ultimate-welcome3.3635.63

Server storage [IO: ▲7.46MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 132 new files
Database: 3 new tables, 2 new options
New tables
wp_oxi_div_style
wp_oxi_div_list
wp_oxi_div_import
New WordPress options
widget_oxi_ultimate_accordions_widget
accordions_or_faqs_activation_date

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accordions - Multiple Accordions or FAQs Builder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲14315.89 ▲0.287.67 ▲0.2948.15 ▼0.09
Dashboard /wp-admin2,985 ▲1325.95 ▲0.10137.24 ▲4.79106.35 ▲1.02
Posts /wp-admin/edit.php2,758 ▲522.70 ▲0.0265.39 ▼2.8190.57 ▲0.96
Add New Post /wp-admin/post-new.php2,072 ▲59119.24 ▲0.86360.28 ▲7.96102.70 ▼3.33
Media Library /wp-admin/upload.php1,824 ▲525.03 ▲0.03145.93 ▼3.17113.17 ▼0.78
Create New /wp-admin/admin.php?page=oxi-accordions-ultimate-new5,5703.86101.41261.50
Settings /wp-admin/admin.php?page=oxi-accordions-ultimate-settings1,3883.0168.65110.19
Shortcode /wp-admin/admin.php?page=oxi-accordions-ultimate1,6023.3797.83134.13
Oxilab Plugins /wp-admin/admin.php?page=oxi-accordions-ultimate-plugins1,5332.7265.11141.40
Support /wp-admin/admin.php?page=oxi-accordions-ultimate-welcome2,0489.78250.19132.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 3 tables
    • wp_oxi_div_import
    • wp_oxi_div_list
    • wp_oxi_div_style
  • The uninstall procedure has failed, leaving 2 options in the database
    • widget_oxi_ultimate_accordions_widget
    • accordions_or_faqs_activation_date

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Trait 'OXI_ACCORDIONS_PLUGINS\\Helper\\Additional' not found in wp-content/plugins/accordions-or-faqs/Layouts/Admin.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/accordions-or-faqs/Includes/Widget.php:10
    • > PHP Fatal error
      Trait 'OXI_ACCORDIONS_PLUGINS\\Helper\\Additional' not found in wp-content/plugins/accordions-or-faqs/Includes/Settings.php on line 10
    • > PHP Fatal error
      Trait 'OXI_ACCORDIONS_PLUGINS\\Helper\\Additional' not found in wp-content/plugins/accordions-or-faqs/Oxilab/Welcome.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'OXI_ACCORDIONS_PLUGINS\\Layouts\\Admin' not found in wp-content/plugins/accordions-or-faqs/Layouts/Helper.php:13
    • > PHP Fatal error
      Trait 'OXI_ACCORDIONS_PLUGINS\\Helper\\Additional' not found in wp-content/plugins/accordions-or-faqs/Includes/Front_Page.php on line 10
    • > PHP Fatal error
      Trait 'OXI_ACCORDIONS_PLUGINS\\Helper\\Helper' not found in wp-content/plugins/accordions-or-faqs/Includes/Templates.php on line 10
    • > PHP Fatal error
      Trait 'OXI_ACCORDIONS_PLUGINS\\Helper\\Helper' not found in wp-content/plugins/accordions-or-faqs/Classes/Bootstrap.php on line 10
    • > PHP Fatal error
      Trait 'OXI_ACCORDIONS_PLUGINS\\Helper\\Additional' not found in wp-content/plugins/accordions-or-faqs/Oxilab/Plugins.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: accordions plugin, faq, accordions, accordions plugin jquery, collapse...

accordions-or-faqs/index.php 92% from 13 tests

Analyzing the main PHP file in "Accordions - Multiple Accordions or FAQs Builder" version 2.0.1
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("accordions-or-faqs.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected38,787 lines of code in 93 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221,00279711,055
CSS161,46013610,932
SVG30128,889
PHP247971,2287,883
JSON280028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity31.64
▷ Minimum class complexity1.00
▷ Maximum class complexity367.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces5
Interfaces0
Traits4
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods263
▷ Static methods41.52%
▷ Public methods26199.24%
▷ Protected methods00.00%
▷ Private methods20.76%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants56
▷ Global constants712.50%
▷ Class constants4987.50%
▷ Public constants49100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
23 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/sa-logo.png3.82KB2.41KB▼ 36.84%
assets/backend/css/img/trans_bg.png0.08KB0.09KB0.00%
assets/backend/img/icons/arrow.png1.62KB0.53KB▼ 67.43%
assets/backend/js/img/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
assets/backend/img/icons/carret.png1.37KB0.40KB▼ 71.03%