68% custom-referral-spam-blocker

Code Review | Custom Referral Spam Blocker

WordPress plugin Custom Referral Spam Blocker scored68%from 54 tests.

About plugin

  • Plugin page: custom-referral-s...
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jul 29, 2015
  • Latest release: Feb 9, 2017
  • Number of updates: 98
  • Update frequency: every 5.7 days
  • Top authors: csmicfool (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

500+ active /16,288 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.28ms] Passed 4 tests

An overview of server-side resources used by Custom Referral Spam Blocker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1046.85 ▲3.45
Dashboard /wp-admin3.41 ▲0.1147.12 ▲0.86
Posts /wp-admin/edit.php3.46 ▲0.1048.06 ▼0.95
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.97 ▼4.48
Media Library /wp-admin/upload.php3.33 ▲0.1039.70 ▲6.17
Custom Referral Spam Blocker /wp-admin/options-general.php?page=custom_referral_spam_blocker3.8832.74

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
crsb_spammers_list
crsb_db_version
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Referral Spam Blocker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.42 ▲0.071.67 ▼0.0543.05 ▲1.12
Dashboard /wp-admin2,202 ▲255.62 ▲0.0293.73 ▲7.4142.18 ▼0.99
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0436.74 ▲1.0431.47 ▼6.17
Add New Post /wp-admin/post-new.php1,538 ▲1217.86 ▼5.25602.21 ▼84.1871.77 ▲21.68
Media Library /wp-admin/upload.php1,401 ▲74.24 ▲0.0694.14 ▼1.5041.57 ▼3.97
Custom Referral Spam Blocker /wp-admin/options-general.php?page=custom_referral_spam_blocker8311.9922.7664.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/custom-referral-spam-blocker/idna-convert/idna_convert.class.php+426
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • crsb_db_version
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • crsb_spammers_list

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/custom-referral-spam-blocker/idna-convert/example.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-referral-spam-blocker/custom-referral-spam-blocker.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
4 plugin tags: referrals, spam, seo, referral spam

custom-referral-spam-blocker/custom-referral-spam-blocker.php Passed 13 tests

The principal PHP file in "Custom Referral Spam Blocker" v. 1.4.6 is loaded by WordPress automatically on each request
87 characters long description:
This plugin blocks referral spam bots which are screwing up your Google Analytics data.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin4,018 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP51394063,816
Markdown1340172
JSON10030

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity140.00
▷ Minimum class complexity67.00
▷ Maximum class complexity213.00
Average method complexity8.94
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods1028.57%
▷ Public methods1028.57%
▷ Protected methods1748.57%
▷ Private methods822.86%
Functions20
▷ Named functions20100.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
1 PNG file occupies 0.47MB with 0.41MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner-772x250_source.png482.15KB66.93KB▼ 86.12%