90% lightweight-accordion

Code Review | Lightweight Accordion

WordPress plugin Lightweight Accordion scored90%from 54 tests.

About plugin

  • Plugin page: lightweight-accor...
  • Plugin version: 1.5.16
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Mar 29, 2023
  • Number of updates: 50
  • Update frequency: every 21.6 days
  • Top authors: someguy9 (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

9,000+ active /58,605 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by Lightweight Accordion
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.10 ▼0.18
Dashboard /wp-admin3.31 ▼0.0348.25 ▼16.78
Posts /wp-admin/edit.php3.36 ▲0.0149.48 ▲1.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.34 ▼1.45
Media Library /wp-admin/upload.php3.23 ▲0.0140.10 ▲4.36

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Lightweight Accordion: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.12 ▼1.181.69 ▼0.1443.64 ▼2.92
Dashboard /wp-admin2,221 ▲184.85 ▲0.01114.61 ▼0.3641.87 ▼3.91
Posts /wp-admin/edit.php2,097 ▼32.06 ▲0.0434.34 ▼2.1838.23 ▲2.14
Add New Post /wp-admin/post-new.php6,364 ▲4,81927.84 ▲4.66926.17 ▲264.7452.98 ▲0.55
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.05117.56 ▲5.7548.47 ▲2.13

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: collapsible, blocks, block, accordion, performance

lightweight-accordion/lightweight-accordion.php 92% from 13 tests

Analyzing the main PHP file in "Lightweight Accordion" version 1.5.16
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 162 characters long)

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 detected457 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript191196
PHP22716190
CSS20053
JSON10011
XML1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin