68% honeypot-toolkit

Code Review | Honeypot Toolkit

WordPress plugin Honeypot Toolkit scored68%from 54 tests.

About plugin

  • Plugin page: honeypot-toolkit
  • Plugin version: 4.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 22, 2017
  • Latest release: Apr 4, 2023
  • Number of updates: 55
  • Update frequency: every 35.1 days
  • Top authors: foomagoo (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /13,496 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▲2.83ms] Passed 4 tests

This is a short check of server-side resources used by Honeypot Toolkit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.79 ▲1.69
Dashboard /wp-admin3.38 ▲0.0757.88 ▲8.20
Posts /wp-admin/edit.php3.43 ▲0.0750.44 ▼2.50
Add New Post /wp-admin/post-new.php5.96 ▲0.07105.50 ▲4.08
Media Library /wp-admin/upload.php3.30 ▲0.0748.52 ▲8.05
Settings /wp-admin/admin.php?page=Honeypot_Toolkit3.3647.55
Activity List /wp-admin/admin.php?page=HT_activity_list3.2942.60
Whitelist /wp-admin/admin.php?page=HT_whitelist3.3032.51
Blocked List /wp-admin/admin.php?page=HT_blocked_list3.3039.41

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 19 new files
Database: 2 new tables, 6 new options
New tables
wp_ht_ip_list
wp_ht_activity
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Honeypot Toolkit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12313.57 ▼0.801.90 ▲0.1645.02 ▼0.94
Dashboard /wp-admin2,268 ▲684.96 ▼0.88144.31 ▲34.5785.75 ▲43.45
Posts /wp-admin/edit.php2,145 ▲452.02 ▲0.0143.42 ▲5.8452.43 ▲17.31
Add New Post /wp-admin/post-new.php1,569 ▲3822.97 ▼0.15773.37 ▲78.0161.39 ▲1.49
Media Library /wp-admin/upload.php1,438 ▲384.16 ▼0.04133.31 ▲17.0354.65 ▲5.75
Settings /wp-admin/admin.php?page=Honeypot_Toolkit4,2022.8362.8542.83
Activity List /wp-admin/admin.php?page=HT_activity_list1,1212.1859.5433.01
Whitelist /wp-admin/admin.php?page=HT_whitelist1,1852.3854.9735.86
Blocked List /wp-admin/admin.php?page=HT_blocked_list1,3462.3950.8735.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_ht_activity
    • wp_ht_ip_list
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/honeypot-toolkit/tpl/settings.php
    • > /wp-content/plugins/honeypot-toolkit/tpl/whitelist.php
    • > /wp-content/plugins/honeypot-toolkit/tpl/single_settings.php
    • > /wp-content/plugins/honeypot-toolkit/tpl/activityList.php
    • > /wp-content/plugins/honeypot-toolkit/tpl/blockedList.php
  • 147× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 27
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/honeypot-toolkit/tpl/activity_list_page_js.php:17
    • > PHP Notice
      Undefined variable: htSettings in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 27
    • > PHP Notice
      Undefined variable: htSettings in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 27
    • > PHP Notice
      Undefined variable: htSettings in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 23
    • > PHP Notice
      Undefined variable: htSettings in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 27
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/honeypot-toolkit/tpl/single_settings.php on line 13
    • > PHP Notice
      Undefined variable: htSettings in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 27
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 27
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/honeypot-toolkit/tpl/settings.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: brute force protection, spamcop, login monitor, ip blacklist, spam prevention...

honeypot-toolkit/honeypot-toolkit.php 92% from 13 tests

"Honeypot Toolkit" version 4.4.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 179 characters long)

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
No dangerous file extensions were detected3,664 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP16411213,255
CSS1770409

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity174.67
▷ Minimum class complexity6.00
▷ Maximum class complexity293.00
Average method complexity10.14
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods57
▷ Static methods35.26%
▷ Public methods57100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/honeypot-icon.png1.89KB1.10KB▼ 41.59%