84% bot-detect

Code Review | Bot Detect - Protect your content from bots

WordPress plugin Bot Detect - Protect your content from bots scored84%from 54 tests.

About plugin

  • Plugin page: bot-detect
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9
  • WordPress version: 6.3.1
  • First release: May 7, 2022
  • Latest release: May 7, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: devlobb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,297 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Bot Detect - Protect your content from bots
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0134.09 ▼4.66
Dashboard /wp-admin3.31 ▲0.0044.23 ▲0.02
Posts /wp-admin/edit.php3.36 ▲0.0045.88 ▼4.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.15 ▼12.26
Media Library /wp-admin/upload.php3.23 ▲0.0032.22 ▼2.69

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Bot Detect - Protect your content from bots
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼0.971.64 ▼0.1038.54 ▼2.24
Dashboard /wp-admin2,203 ▲156.00 ▲1.0897.89 ▼6.1737.17 ▼3.66
Posts /wp-admin/edit.php2,089 ▼02.17 ▲0.2141.67 ▲0.8134.98 ▲0.56
Add New Post /wp-admin/post-new.php1,537 ▲223.31 ▲0.12649.10 ▼34.9151.65 ▼2.13
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0096.10 ▼14.1941.66 ▼4.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bot-detect/bot-detect.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: block, wordpress, shortcodes, bot

bot-detect/bot-detect.php 92% from 13 tests

This is the main PHP file of "Bot Detect - Protect your content from bots" version 1.0, 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: The domain path folder does not exist ("/languages")

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
Everything looks great! No dangerous files found in this plugin38 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2102938

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon-128x128.png36.92KB13.22KB▼ 64.18%