78% serious-toxic-comments

Code Review | Serious Toxic Comments

WordPress plugin Serious Toxic Comments scored 78% from 54 tests.

About plugin

  • Plugin page: serious-toxic-com...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2.2
  • WordPress version: 6.3.1
  • First release: May 18, 2019
  • Latest release: Jul 2, 2019
  • Number of updates: 6
  • Update frequency: every 7.5 days
  • Top authors: softmodeling (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 550 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.02MB] [CPU: ▼3.70ms] Passed 4 tests

A check of server-side resources used by Serious Toxic Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0335.78 ▼6.26
Dashboard /wp-admin3.32 ▲0.0243.97 ▼3.91
Posts /wp-admin/edit.php3.37 ▲0.0245.76 ▲2.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.76 ▼2.30
Media Library /wp-admin/upload.php3.25 ▲0.0231.11 ▼2.34

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Serious Toxic Comments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲16114.73 ▲0.3555.37 ▲53.3339.41 ▼5.21
Dashboard /wp-admin2,210 ▲194.85 ▼1.01111.12 ▲12.5537.99 ▼1.66
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0338.57 ▲4.0336.67 ▲3.98
Add New Post /wp-admin/post-new.php1,522 ▼823.42 ▲5.14698.03 ▲70.1563.62 ▲11.59
Media Library /wp-admin/upload.php1,389 ▲14.29 ▲0.0893.38 ▼9.9641.86 ▼2.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
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/serious-toxic-comments/public/partials/serious-toxic-comments-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Serious_Toxic_Comments_Public' not found in wp-content/plugins/serious-toxic-comments/public/class-serious-toxic-comments-public-ext.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Serious_Toxic_Comments' not found in wp-content/plugins/serious-toxic-comments/includes/class-serious-toxic-comments-ext.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

serious-toxic-comments/serious-toxic-comments.php Passed 13 tests

The main PHP file in "Serious Toxic Comments" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
42 characters long description:
Flag and block toxic comments on your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin367 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP15163445358
JavaScript58589
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.18
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.34
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods2771.05%
▷ Protected methods821.05%
▷ Private methods37.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin