84% speedplus-antimat

Code Review | SpeedPlus AntiMat: Remove profanity in comments

WordPress plugin SpeedPlus AntiMat: Remove profanity in comments scored84%from 54 tests.

About plugin

  • Plugin page: speedplus-antimat
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Sep 6, 2021
  • Latest release: Sep 24, 2022
  • Number of updates: 15
  • Update frequency: every 25.5 days
  • Top authors: speedplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,269 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.66ms] Passed 4 tests

An overview of server-side resources used by SpeedPlus AntiMat: Remove profanity in comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.27 ▼2.93
Dashboard /wp-admin3.32 ▲0.0245.13 ▼3.71
Posts /wp-admin/edit.php3.37 ▲0.0140.91 ▼6.89
Add New Post /wp-admin/post-new.php5.90 ▲0.01101.41 ▲18.81
Media Library /wp-admin/upload.php3.24 ▲0.0133.99 ▼1.09
SpeedPlus AntiMat /wp-admin/options-general.php?page=speedplus-antimat3.2132.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SpeedPlus AntiMat: Remove profanity in comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.14 ▼1.114.63 ▲2.9937.33 ▼6.21
Dashboard /wp-admin2,215 ▲275.89 ▲0.9894.91 ▼11.2541.05 ▲1.77
Posts /wp-admin/edit.php2,092 ▲61.99 ▼0.0136.37 ▼0.4233.48 ▲2.65
Add New Post /wp-admin/post-new.php1,519 ▼2317.85 ▼0.64600.55 ▼2.9752.38 ▼0.34
Media Library /wp-admin/upload.php1,394 ▲64.23 ▲0.0197.33 ▲1.6942.34 ▲1.15
SpeedPlus AntiMat /wp-admin/options-general.php?page=speedplus-antimat9821.7425.7732.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 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)
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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/speedplus-antimat/speedplus-antimat.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/speedplus-antimat/includes/options.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

speedplus-antimat/speedplus-antimat.php 92% from 13 tests

"SpeedPlus AntiMat: Remove profanity in comments" version 2.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected668 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33268437
PO File27684216
CSS10015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity13.50
▷ Minimum method complexity9.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
There are no PNG files in this plugin