84% bootstrap-collapse

Code Review | Bootstrap collapse

WordPress plugin Bootstrap collapse scored84%from 54 tests.

About plugin

  • Plugin page: bootstrap-collapse
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Jul 12, 2013
  • Latest release: Sep 23, 2014
  • Number of updates: 22
  • Update frequency: every 19.9 days
  • Top authors: sureshdsk (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /6,685 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.03ms] Passed 4 tests

This is a short check of server-side resources used by Bootstrap collapse
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.43 ▼3.05
Dashboard /wp-admin3.33 ▼0.0158.28 ▼4.09
Posts /wp-admin/edit.php3.38 ▲0.0351.53 ▲2.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0599.90 ▼3.94
Media Library /wp-admin/upload.php3.26 ▲0.0340.05 ▲5.16

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Bootstrap collapse
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17713.83 ▼0.926.05 ▲4.1343.40 ▲3.16
Dashboard /wp-admin2,241 ▲505.11 ▲0.22106.79 ▼2.6039.66 ▲0.26
Posts /wp-admin/edit.php2,129 ▲432.34 ▲0.2844.09 ▲6.7435.54 ▲1.10
Add New Post /wp-admin/post-new.php1,551 ▲2718.44 ▼5.12622.20 ▼21.7837.77 ▼14.31
Media Library /wp-admin/upload.php1,423 ▲384.49 ▲0.29103.80 ▲4.2543.37 ▲1.10

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bootstrap-collapse/bootstrap_collapse.php:14

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
Please take inspiration from this readme.txt

bootstrap-collapse/bootstrap_collapse.php 92% from 13 tests

The entry point to "Bootstrap collapse" version 1.0.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bootstrap-collapse.php" instead of "bootstrap_collapse.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
There were no executable files found in this plugin306 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions9100.00%
▷ Anonymous functions00.00%
▷ 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
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png14.24KB9.04KB▼ 36.49%
screenshot-3.png17.25KB9.29KB▼ 46.14%
screenshot-1.png20.65KB11.85KB▼ 42.64%