84% cleantalk-bbpress-spam-scanner

Code Review | CleanTalk bbPress spam scanner

WordPress plugin CleanTalk bbPress spam scanner scored84%from 54 tests.

About plugin

  • Plugin page: cleantalk-bbpress...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 29, 2020
  • Latest release: Nov 21, 2022
  • Number of updates: 10
  • Update frequency: every 72.5 days
  • Top authors: cleantalk (70%)glomberg (40%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,042 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.59ms] Passed 4 tests

Server-side resources used by CleanTalk bbPress spam scanner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.21 ▼2.96
Dashboard /wp-admin3.31 ▲0.0147.77 ▼5.41
Posts /wp-admin/edit.php3.36 ▲0.0043.74 ▼7.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.53 ▼14.98
Media Library /wp-admin/upload.php3.23 ▲0.0038.90 ▲3.76

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CleanTalk bbPress spam scanner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.74 ▼0.011.77 ▼0.2942.84 ▲0.72
Dashboard /wp-admin2,203 ▲155.74 ▲0.8895.27 ▼17.9339.47 ▼7.05
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0334.01 ▼3.2832.19 ▼0.69
Add New Post /wp-admin/post-new.php1,534 ▲123.17 ▲0.23651.36 ▼29.9454.94 ▼12.35
Media Library /wp-admin/upload.php1,388 ▼34.23 ▼0.0694.96 ▼3.0540.66 ▼4.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Cleantalk\\ApbctWP\\CleantalkListTable' not found in wp-content/plugins/cleantalk-bbpress-spam-scanner/inc/CleantalkBbPressListTable.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: spam check, spam user, cleaner, bbpress, spam comments...

cleantalk-bbpress-spam-scanner/cleantalk-bbpress-scan.php 85% from 13 tests

The main PHP file in "CleanTalk bbPress spam scanner" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cleantalk-bbpress-spam-scanner.php" instead of "cleantalk-bbpress-scan.php")

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
Everything looks great! No dangerous files found in this plugin861 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP415846520
JavaScript16114341

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.33
▷ Minimum class complexity4.00
▷ Maximum class complexity37.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods622.22%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions1
▷ Named functions1100.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 are no PNG files in this plugin