83% webpurifytextreplace

Code Review | WebPurify Profanity Filter

WordPress plugin WebPurify Profanity Filter scored83%from 54 tests.

About plugin

  • Plugin page: webpurifytextreplace
  • Plugin version: 4.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.4.2
  • WordPress version: 6.3.1
  • First release: May 10, 2007
  • Latest release: Jul 20, 2020
  • Number of updates: 85
  • Update frequency: every 56.7 days
  • Top authors: webpurify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /8,416 total downloads

Benchmarks

Plugin footprint 82% 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.06MB] [CPU: ▼7.09ms] 75% from 4 tests

This is a short check of server-side resources used by WebPurify Profanity Filter
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 610.06ms on /wp-admin/options-general.php?page=webpurify-options)
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.54 ▲2.62
Dashboard /wp-admin3.37 ▲0.0347.55 ▼16.19
Posts /wp-admin/edit.php3.48 ▲0.1351.22 ▲0.41
Add New Post /wp-admin/post-new.php5.97 ▲0.0988.88 ▼12.08
Media Library /wp-admin/upload.php3.29 ▲0.0739.81 ▼0.51
WebPurify /wp-admin/options-general.php?page=webpurify-options3.27610.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WebPurify Profanity Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.56 ▼1.021.94 ▲0.0342.57 ▼2.67
Dashboard /wp-admin2,213 ▲255.85 ▼0.04102.31 ▼15.0739.10 ▼3.81
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0237.29 ▼0.2335.43 ▲2.05
Add New Post /wp-admin/post-new.php1,534 ▲2023.21 ▲5.60619.29 ▼63.4355.65 ▼0.68
Media Library /wp-admin/upload.php1,389 ▲44.26 ▼0.04103.67 ▼0.5943.91 ▲0.62
WebPurify /wp-admin/options-general.php?page=webpurify-options9982.0724.2830.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=webpurify-options
    • > Notice in wp-content/plugins/webpurifytextreplace/webpurify-api.php+272
    Undefined property: stdClass::$word

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: filter, comments, profanity, bbpress, swearing...

webpurifytextreplace/webpurifytextreplace-options.php 85% from 13 tests

The principal PHP file in "WebPurify Profanity Filter" v. 4.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("webpurifytextreplace.php" instead of "webpurifytextreplace-options.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected607 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3178267473
JavaScript4423569
Markdown125065

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No 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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 are no PNG files in this plugin