84% super-accordion

Code Review | Super Accordion

WordPress plugin Super Accordion scored84%from 54 tests.

About plugin

  • Plugin page: super-accordion
  • Plugin version: 6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Mar 30, 2016
  • Number of updates: 26
  • Update frequency: every 0.8 days
  • Top authors: shadowvault (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /869 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.60ms] Passed 4 tests

Analyzing server-side resources used by Super Accordion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.52 ▼6.42
Dashboard /wp-admin3.32 ▼0.0247.58 ▼16.16
Posts /wp-admin/edit.php3.37 ▲0.0250.22 ▲3.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.73 ▼4.24
Media Library /wp-admin/upload.php3.24 ▲0.0136.50 ▲0.44

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Super Accordion: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.77 ▼0.478.65 ▲6.9844.47 ▲3.79
Dashboard /wp-admin2,195 ▲185.58 ▼0.0684.35 ▼4.9438.05 ▲0.60
Posts /wp-admin/edit.php2,106 ▲62.00 ▼0.0135.28 ▼6.0134.46 ▼4.02
Add New Post /wp-admin/post-new.php1,532 ▲623.40 ▲0.39598.28 ▼79.2050.87 ▼10.46
Media Library /wp-admin/upload.php1,409 ▲64.25 ▲0.10100.21 ▼14.7543.38 ▼6.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/super-accordion/plugin-hook.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/super-accordion/plugin-hook.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: You can take inspiration from this readme.txt

super-accordion/plugin-hook.php 92% from 13 tests

The main PHP file in "Super Accordion" ver. 6.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("super-accordion.php" instead of "plugin-hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin270 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22840164
CSS14069
PHP1643837

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/minus_icon.png1.02KB0.15KB▼ 84.96%
assets/css/plus_icon.png1.08KB0.19KB▼ 82.22%
assets/js/btn.png1.08KB0.24KB▼ 78.27%