90% simple-spoiler

Code Review | Simple Spoiler

WordPress plugin Simple Spoiler scored90%from 54 tests.

About plugin

  • Plugin page: simple-spoiler
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Jan 13, 2018
  • Latest release: Aug 4, 2022
  • Number of updates: 24
  • Update frequency: every 69.3 days
  • Top authors: webliberty (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /11,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.73ms] Passed 4 tests

This is a short check of server-side resources used by Simple Spoiler
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.41 ▲1.08
Dashboard /wp-admin3.34 ▲0.0346.13 ▼0.71
Posts /wp-admin/edit.php3.39 ▲0.0340.38 ▼5.88
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.58 ▼17.42
Media Library /wp-admin/upload.php3.26 ▲0.0338.04 ▲6.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Simple Spoiler: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.71 ▼0.659.10 ▲7.5243.79 ▲0.95
Dashboard /wp-admin2,208 ▲305.50 ▼0.1584.93 ▼20.2339.56 ▼8.06
Posts /wp-admin/edit.php2,113 ▲131.99 ▼0.0234.65 ▼5.5936.82 ▼0.41
Add New Post /wp-admin/post-new.php1,541 ▲1423.53 ▲0.65678.66 ▲64.7368.14 ▲15.00
Media Library /wp-admin/upload.php1,416 ▲134.17 ▲0.02110.96 ▲10.6749.13 ▲6.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were 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
1 plugin tags: spoiler

simple-spoiler/simple-spoiler.php Passed 13 tests

This is the main PHP file of "Simple Spoiler" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
The plugin allows to create simple spoilers with shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin150 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP22411127
CSS23016
JavaScript2007

PHP code Passed 2 tests

An overview 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.24
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin