84% buddypress-messages-spam-blocker

Code Review | Buddypress Messages Spam Blocker

WordPress plugin Buddypress Messages Spam Blocker scored84%from 54 tests.

About plugin

  • Plugin page: buddypress-messag...
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jan 21, 2014
  • Latest release: Apr 26, 2016
  • Number of updates: 31
  • Update frequency: every 26.6 days
  • Top authors: quan_flo (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Buddypress Messages Spam Blocker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.16 ▼1.61
Dashboard /wp-admin3.31 ▲0.0047.77 ▼8.86
Posts /wp-admin/edit.php3.36 ▲0.0046.22 ▼7.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.10 ▼10.53
Media Library /wp-admin/upload.php3.23 ▲0.0037.34 ▼0.59

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

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

Browser metrics Passed 4 tests

Buddypress Messages Spam Blocker: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▲0.182.19 ▲0.1746.09 ▲0.73
Dashboard /wp-admin2,198 ▲245.59 ▲0.0285.49 ▼9.5841.45 ▼0.97
Posts /wp-admin/edit.php2,100 ▲181.95 ▼0.0636.95 ▲1.2734.82 ▼0.94
Add New Post /wp-admin/post-new.php1,526 ▼223.15 ▼0.23658.70 ▲5.6754.60 ▼5.23
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.03107.45 ▲8.0142.86 ▼1.57

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-messages-spam-blocker/buddypress-messages-spamblocker.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-messages-spam-blocker/plugin.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: messages, buddypress, spam

buddypress-messages-spam-blocker/buddypress-messages-spamblocker.php 85% from 13 tests

"Buddypress Messages Spam Blocker" version 2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("buddypress-messages-spam-blocker.php" instead of "buddypress-messages-spamblocker.php")

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
Success! There were no dangerous files found in this plugin122 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2143885
PO File12737

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.37
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin