78% bleep-filter

Code Review | Bleep Filter

WordPress plugin Bleep Filter scored78%from 54 tests.

About plugin

  • Plugin page: bleep-filter
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9.1
  • WordPress version: 6.3.1
  • First release: May 22, 2013
  • Latest release: Jul 20, 2014
  • Number of updates: 16
  • Update frequency: every 26.5 days
  • Top authors: nathanlampe (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,325 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.52ms] Passed 4 tests

This is a short check of server-side resources used by Bleep Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.03 ▼2.07
Dashboard /wp-admin3.36 ▲0.0247.06 ▼9.50
Posts /wp-admin/edit.php3.47 ▲0.1247.81 ▼3.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.44 ▼19.33
Media Library /wp-admin/upload.php3.28 ▲0.0536.12 ▼0.30
Filtered Words /wp-admin/edit.php?post_type=bleep_filter_words3.3340.58
Exception Words /wp-admin/edit.php?post_type=bleep_exception3.3338.24

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

How much does this plugin use your filesystem and database?
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
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Bleep Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9514.24 ▼0.101.83 ▲0.0646.11 ▲7.45
Dashboard /wp-admin2,236 ▲595.62 ▼0.0487.36 ▼6.0041.99 ▼0.57
Posts /wp-admin/edit.php2,146 ▲462.05 ▲0.0337.01 ▼1.4631.84 ▼5.41
Add New Post /wp-admin/post-new.php1,563 ▲3723.05 ▲0.15638.27 ▲23.1759.15 ▲11.67
Media Library /wp-admin/upload.php1,441 ▲414.15 ▼0.07109.48 ▲10.4743.63 ▼1.85
Filter Settings /wp-admin/bleep-settings.php260.420.0713.94
Import /wp-admin/bleep-import.php260.420.075.51
Filtered Words /wp-admin/edit.php?post_type=bleep_filter_words1,1101.9942.0731.10
Exception Words /wp-admin/edit.php?post_type=bleep_exception1,1102.0039.3134.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'BleepFilter' not found in wp-content/plugins/bleep-filter/wpadmin.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bleep-filter/wpadmin.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'BleepFilter' not found in wp-content/plugins/bleep-filter/phoneticbleepfilter.class.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/bleep-settings.php
    • > Network (severe)
    wp-admin/bleep-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/bleep-import.php
    • > Network (severe)
    wp-admin/bleep-import.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: content filter, profanity filter, word filter, phonetic filter, bleep filter...

bleep-filter/bleep_filter.php 85% from 13 tests

The principal PHP file in "Bleep Filter" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bleep-filter.php" instead of "bleep_filter.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 171 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
Everything looks great! No dangerous files found in this plugin544 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP412575517
CSS18027

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity29.33
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected