73% spiderblocker

Code Review | Spider Blocker

WordPress plugin Spider Blocker scored 73% from 54 tests.

About plugin

  • Plugin page: spiderblocker
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 8, 2015
  • Latest release: Jul 18, 2023
  • Number of updates: 52
  • Update frequency: every 54.6 days
  • Top authors: niteoweb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30,000+ active / 541,707 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.79MB] [CPU: ▼32.62ms] Passed 4 tests

A check of server-side resources used by Spider Blocker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1437.50 ▼6.97
Dashboard /wp-admin3.16 ▼0.1523.95 ▼30.45
Posts /wp-admin/edit.php3.16 ▼0.2031.04 ▼13.78
Add New Post /wp-admin/post-new.php3.16 ▼2.7326.70 ▼70.52
Media Library /wp-admin/upload.php3.16 ▼0.0723.22 ▼15.72
SpiderBlocker /wp-admin/tools.php?page=ni_spider_block3.1622.97

Server storage [IO: ▲0.03MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • The plugin illegally modified 1 file (2.84KB) outside of "wp-content/plugins/spiderblocker/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
Niteoweb.SpiderBlocker.Bots
widget_recent-posts

Browser metrics Passed 4 tests

Spider Blocker: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.151.58 ▼0.5640.35 ▼6.32
Dashboard /wp-admin2,210 ▲225.79 ▼0.10101.53 ▲0.2238.14 ▼3.64
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0050.91 ▲8.1945.15 ▲7.79
Add New Post /wp-admin/post-new.php1,550 ▲3118.25 ▼4.97616.77 ▼28.4666.02 ▲14.92
Media Library /wp-admin/upload.php1,386 ▼24.24 ▲0.1098.59 ▼9.6142.69 ▼10.43
SpiderBlocker /wp-admin/tools.php?page=ni_spider_block2,3973.7385.4831.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/spiderblocker/index.php+940
    Undefined index: SERVER_SOFTWARE
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=ni_spider_block
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/spiderblocker/index.php+940
    Undefined index: SERVER_SOFTWARE

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === spiderblocker === )
The official readme.txt might help

spiderblocker/index.php 77% from 13 tests

This is the main PHP file of "Spider Blocker" version 1.3.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("i18n")
  • Main file name: The principal plugin file should be the same as the plugin slug ("spiderblocker.php" instead of "index.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/i18n")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected809 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2120222809

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods3286.49%
▷ Protected methods38.11%
▷ Private methods25.41%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.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 were not PNG files found in your plugin