84% archive-bot-blocker

Code Review | Archive Bot Blocker

WordPress plugin Archive Bot Blocker scored84%from 54 tests.

About plugin

  • Plugin page: archive-bot-blocker
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Sep 30, 2019
  • Number of updates: 5
  • Update frequency: every 6.6 days
  • Top authors: wpsunny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /629 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.02MB] [CPU: ▼6.09ms] Passed 4 tests

Analyzing server-side resources used by Archive Bot Blocker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.67 ▲3.61
Dashboard /wp-admin3.33 ▲0.0245.76 ▼4.70
Posts /wp-admin/edit.php3.38 ▲0.0246.19 ▼5.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.73 ▼17.36
Media Library /wp-admin/upload.php3.25 ▲0.0238.06 ▲2.92
Archive Bot Blocker /wp-admin/options-general.php?page=archive_bot_blocker3.2232.18

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options
abb_error_code
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
abb_user_agent
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Archive Bot Blocker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.08 ▼0.281.77 ▲0.1643.67 ▲5.79
Dashboard /wp-admin2,199 ▲285.64 ▼0.0396.48 ▼0.2241.11 ▼1.28
Posts /wp-admin/edit.php2,107 ▲41.98 ▼0.0336.10 ▼3.7034.95 ▼4.40
Add New Post /wp-admin/post-new.php1,529 ▲323.14 ▼0.45637.64 ▼48.6255.52 ▼0.22
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.0599.34 ▼22.8043.67 ▼7.83
Archive Bot Blocker /wp-admin/options-general.php?page=archive_bot_blocker1,2672.0223.8123.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • abb_error_code
    • abb_user_agent

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/archive-bot-blocker/archive-bot-blocker.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

archive-bot-blocker/archive-bot-blocker.php 92% from 13 tests

The main PHP file in "Archive Bot Blocker" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 171 characters long)

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
There were no executable files found in this plugin96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP122896

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected