94% bbspoiler

Code Review | BBSpoiler

WordPress plugin BBSpoiler scored 94% from 54 tests.

About plugin

  • Plugin page: bbspoiler
  • Plugin version: 2.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9
  • WordPress version: 5.9.2
  • First release: Aug 21, 2014
  • Latest release: Jan 23, 2022
  • Number of updates: 41
  • Update frequency: every 66.2 days
  • Top authors: Flector (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

7,000+ active / 38,409 total downloads

Benchmarks

Plugin footprint Passed 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: ▼291.99ms] Passed 4 tests

An overview of server-side resources used by BBSpoiler
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0665.06 ▲6.91
Dashboard /wp-admin3.44 ▲0.0340.93 ▲3.96
Posts /wp-admin/edit.php3.67 ▲0.0340.21 ▼6.58
Add New Post /wp-admin/post-new.php6.92 ▼0.05101.89 ▼1,159.16
Media Library /wp-admin/upload.php3.32 ▲0.0228.74 ▼6.18

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

BBSpoiler: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,885 ▲13116.58 ▲0.899.66 ▲3.292.51 ▲0.13
Dashboard /wp-admin2,895 ▲376.17 ▲0.02120.41 ▼19.02156.25 ▼9.05
Posts /wp-admin/edit.php2,694 ▲33.24 ▼0.1164.23 ▲0.29150.28 ▲7.44
Add New Post /wp-admin/post-new.php1,667 ▲616.84 ▼0.24416.16 ▼44.46153.23 ▼77.31
Media Library /wp-admin/upload.php1,707 ▲95.52 ▼0.02139.49 ▼7.85185.18 ▼12.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bbspoiler/bbspoiler.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (37 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

bbspoiler/bbspoiler.php Passed 13 tests

The principal PHP file in "BBSpoiler" v. 2.01 is loaded by WordPress automatically on each request
80 characters long description:
This plugin allows you to hide text under the tags [spoiler]your text[/spoiler].

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin408 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1210226
PHP12110120
JavaScript29362

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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
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%
Functions10
▷ Named functions10100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/spoiler.png3.61KB4.00KB0.00%