84% javascript-css-accordion

Code Review | Javascript CSS Accordion

WordPress plugin Javascript CSS Accordion scored84%from 54 tests.

About plugin

  • Plugin page: javascript-css-ac...
  • Plugin version: 0.0.06
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2019
  • Latest release: Nov 3, 2021
  • Number of updates: 9
  • Update frequency: every 75.8 days
  • Top authors: shortdark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.71ms] Passed 4 tests

Server-side resources used by Javascript CSS Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.27 ▼2.14
Dashboard /wp-admin3.31 ▲0.0049.88 ▼2.10
Posts /wp-admin/edit.php3.36 ▲0.0051.00 ▼4.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.03 ▼5.94
Media Library /wp-admin/upload.php3.23 ▲0.0039.68 ▲3.59

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Javascript CSS Accordion: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.27 ▼0.022.17 ▲0.1241.42 ▼4.96
Dashboard /wp-admin2,195 ▲155.60 ▼0.1083.21 ▼10.0738.16 ▼6.92
Posts /wp-admin/edit.php2,100 ▼32.05 ▲0.0539.62 ▲1.8337.88 ▲4.80
Add New Post /wp-admin/post-new.php1,554 ▲2318.28 ▼4.86607.95 ▼72.6645.12 ▼5.06
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.02101.50 ▲3.9341.10 ▼7.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 no errors were found, this is by no means 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/javascript-css-accordion/javascript-css-accordion.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: html, accordion

javascript-css-accordion/javascript-css-accordion.php Passed 13 tests

The main file in "Javascript CSS Accordion" v. 0.0.06 serves as a complement to information provided in readme.txt and as the entry point to the plugin
117 characters long description:
This WordPress plugin allows the user to create an accordion on their website that uses plain javascript, not jQuery.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected110 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11221110

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.25
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin