90% otfm-gutenberg-spoiler

Code Review | OtFm Gutenberg Spoiler - (or FAQ) collapse block

WordPress plugin OtFm Gutenberg Spoiler - (or FAQ) collapse block scored90%from 54 tests.

About plugin

  • Plugin page: otfm-gutenberg-sp...
  • Plugin version: 1.5.4
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2018
  • Latest release: Jan 15, 2023
  • Number of updates: 29
  • Update frequency: every 54.7 days
  • Top authors: Otshelnik-Fm (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /7,091 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.90ms] Passed 4 tests

An overview of server-side resources used by OtFm Gutenberg Spoiler - (or FAQ) collapse block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.19 ▼3.05
Dashboard /wp-admin3.35 ▲0.0444.42 ▼3.94
Posts /wp-admin/edit.php3.40 ▲0.0447.55 ▲0.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.68 ▼16.87
Media Library /wp-admin/upload.php3.27 ▲0.0437.54 ▲0.76

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for OtFm Gutenberg Spoiler - (or FAQ) collapse block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16614.09 ▼0.296.04 ▲4.3040.83 ▼3.63
Dashboard /wp-admin2,206 ▲185.89 ▲0.99115.86 ▲5.5139.75 ▼1.76
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0440.39 ▼2.7936.70 ▲1.79
Add New Post /wp-admin/post-new.php6,355 ▲4,82427.63 ▲9.46891.23 ▲245.7658.88 ▼1.57
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.04102.48 ▼4.8344.63 ▲1.50

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: spoiler, frequently asked questions, gutenberg, blocks, gutenberg blocks

otfm-gutenberg-spoiler/otfm-gutenberg-spoiler.php Passed 13 tests

The main file in "OtFm Gutenberg Spoiler - (or FAQ) collapse block" v. 1.5.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
31 characters long description:
Gutenberg Spoiler for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin721 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
Markdown21340277
PHP34648174
CSS370172
JavaScript35163
PO File1122235

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
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