89% wp-referrer-spam-blacklist

Code Review | WP referrer spam blacklist (fight 2040+ Referrer Spammers in (Google/Matomo) Analytics)

WordPress plugin WP referrer spam blacklist (fight 2040+ Referrer Spammers in (Google/Matomo) Analytics) scored 89% from 54 tests.

About plugin

  • Plugin page: wp-referrer-spam-...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: Dec 27, 2020
  • Number of updates: 43
  • Update frequency: every 46.5 days
  • Top authors: rolandinsh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 17,983 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WP referrer spam blacklist (fight 2040+ Referrer Spammers in (Google/Matomo) Analytics)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.02 ▼4.34
Dashboard /wp-admin3.31 ▲0.0146.40 ▼3.20
Posts /wp-admin/edit.php3.42 ▲0.0751.12 ▲2.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.29 ▼0.50
Media Library /wp-admin/upload.php3.23 ▲0.0131.85 ▼3.11

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

WP referrer spam blacklist (fight 2040+ Referrer Spammers in (Google/Matomo) Analytics): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.401.74 ▲0.0245.31 ▼1.32
Dashboard /wp-admin2,203 ▲184.84 ▼0.07107.42 ▼7.3441.98 ▼6.02
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0140.08 ▲0.6835.62 ▼1.49
Add New Post /wp-admin/post-new.php1,543 ▲2418.12 ▼5.05600.43 ▼49.6954.51 ▼1.40
Media Library /wp-admin/upload.php1,388 ▼04.25 ▼0.0595.71 ▼11.7839.92 ▼5.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 32 tag instead of maximum 10
  • Screenshots: Screenshot #1 (none) image missing
You can take inspiration from this readme.txt

wp-referrer-spam-blacklist/wp_referral_black_list.php 92% from 13 tests

The main PHP script in "WP referrer spam blacklist (fight 2040+ Referrer Spammers in (Google/Matomo) Analytics)" version 1.3.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-referrer-spam-blacklist.php" instead of "wp_referral_black_list.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected207 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP455128171
Markdown123036

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.00
▷ Minimum class complexity4.00
▷ Maximum class complexity18.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.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