94% blogsafe-honeypot

Code Review | BlogSafe Honeypot

WordPress plugin BlogSafe Honeypot scored 94% from 54 tests.

About plugin

  • Plugin page: blogsafe-honeypot
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8.0
  • WordPress version: 5.8.1
  • First release: Feb 22, 2021
  • Latest release: Aug 3, 2021
  • Number of updates: 17
  • Update frequency: every 9.8 days
  • Top authors: blogsafe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 247 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼177.27ms] Passed 4 tests

Server-side resources used by BlogSafe Honeypot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0223.42 ▲2.10
Dashboard /wp-admin3.07 ▲0.0130.56 ▼114.16
Posts /wp-admin/edit.php3.16 ▲0.0530.60 ▼0.94
Add New Post /wp-admin/post-new.php5.44 ▼0.0065.70 ▼593.71
Media Library /wp-admin/upload.php3.02 ▲0.0221.73 ▼0.28

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 33 new files
Database: 5 new tables, no new options
New tables
wp_BS_Honeypot_URL_Ignores
wp_BS_Honeypot_Requests
wp_BS_Honeypot_Logins
wp_BS_Honeypot_TORList
wp_BS_Honeypot_IP_Ignores

Browser metrics Passed 4 tests

A check of browser resources used by BlogSafe Honeypot
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,850 ▲24916.27 ▲0.548.46 ▲2.5777.65 ▲0.99
Dashboard /wp-admin2,957 ▲626.19 ▲0.13117.48 ▼19.34185.77 ▲5.06
Posts /wp-admin/edit.php2,766 ▲233.23 ▼0.0063.47 ▼1.63139.63 ▼0.16
Add New Post /wp-admin/post-new.php1,632 ▼2,04122.26 ▲4.64291.80 ▼168.34173.17 ▲9.61
Media Library /wp-admin/upload.php1,770 ▲155.55 ▲0.01126.20 ▼10.53200.09 ▲14.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/blogsafe-honeypot/public/partials/blogsafe-honeypot-public-display.php
    • > /wp-content/plugins/blogsafe-honeypot/admin/partials/blogsafe-honeypot-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid url: ""
  • Plugin Name: Please specify the plugin name on the first line ( === blogsafe-honeypot === )
You can take inspiration from this readme.txt

blogsafe-honeypot/blogsafe-honeypot.php Passed 13 tests

The entry point to "BlogSafe Honeypot" version 1.0.1 is a PHP file that has certain tags in its header comment area
136 characters long description:
BlogSafe honeypot is a 'lite' version our private research tool. Instead of tracking where visitors go, it tracks where they want to go.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,035 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP213185572,030
JavaScript23275
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.18
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods124
▷ Static methods21.61%
▷ Public methods11088.71%
▷ Protected methods10.81%
▷ Private methods1310.48%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.19MB with 0.18MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/BSHoneypotLogo.png134.14KB11.70KB▼ 91.28%
admin/images/BSHoneypotIcon.png57.60KB0.97KB▼ 98.31%