72% accordions-and-tabs-by-vander-web

Code Review | Accordions and Tabs by Vander Web

WordPress plugin Accordions and Tabs by Vander Web scored 72% from 54 tests.

About plugin

  • Plugin page: accordions-and-ta...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.6.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2021
  • Latest release: Mar 4, 2021
  • Number of updates: 2
  • Update frequency: every 7.0 days
  • Top authors: ulrikvander (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 444 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.83ms] Passed 4 tests

A check of server-side resources used by Accordions and Tabs by Vander Web
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0422.26 ▼17.13
Dashboard /wp-admin3.36 ▲0.0544.63 ▼1.87
Posts /wp-admin/edit.php3.41 ▲0.0546.74 ▲2.47
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.13 ▼11.51
Media Library /wp-admin/upload.php3.28 ▲0.0534.80 ▼0.81
Accordion items /wp-admin/edit.php?post_type=vanderweb_accordions3.3237.94
Add new /wp-admin/post-new.php?post_type=vanderweb_accordions3.3949.60
Shortcodes /wp-admin/edit.php?post_type=vanderweb_accordions&page=vanderweb-accordions-shortcodes3.2832.74
Sections /wp-admin/edit-tags.php?taxonomy=vanderweb_acc_section&post_type=vanderweb_accordions3.2728.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Accordions and Tabs by Vander Web
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21513.95 ▼0.635.23 ▲3.0944.11 ▲5.91
Dashboard /wp-admin2,245 ▲565.81 ▲0.88103.78 ▼10.3839.87 ▼3.47
Posts /wp-admin/edit.php2,128 ▲362.00 ▼0.0039.17 ▲3.2534.18 ▲2.54
Add New Post /wp-admin/post-new.php1,547 ▲1923.27 ▲0.08671.92 ▲34.4951.34 ▼8.47
Media Library /wp-admin/upload.php1,430 ▲424.18 ▼0.00101.57 ▲2.0344.52 ▼1.19
Accordion items /wp-admin/edit.php?post_type=vanderweb_accordions1,1001.9736.4529.95
Add new /wp-admin/post-new.php?post_type=vanderweb_accordions2,2637.74167.2561.45
Shortcodes /wp-admin/edit.php?post_type=vanderweb_accordions&page=vanderweb-accordions-shortcodes9512.0422.3325.41
Sections /wp-admin/edit-tags.php?taxonomy=vanderweb_acc_section&post_type=vanderweb_accordions1,2982.1426.4024.61

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=vanderweb_accordions&page=vanderweb-accordions-shortcodes
    • > Notice in wp-content/plugins/accordions-and-tabs-by-vander-web/admin/class-vanderweb-bs4-accordion-admin.php+208
    Trying to access array offset on value of type bool

SRP 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/accordions-and-tabs-by-vander-web/public/partials/vanderweb-bs4-accordion-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/accordions-and-tabs-by-vander-web/admin/partials/vanderweb-bs4-accordion-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (No screenshots available.)
You can take inspiration from this readme.txt

accordions-and-tabs-by-vander-web/vanderweb-bs4-accordion.php 85% from 13 tests

The main PHP file in "Accordions and Tabs by Vander Web" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("accordions-and-tabs-by-vander-web.php" instead of "vanderweb-bs4-accordion.php")

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,951 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS42141,284
PHP13161622550
PO File14355110
JavaScript34607

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected