84% honeypot-comments

Code Review | Honeypot Comments

WordPress plugin Honeypot Comments scored84%from 54 tests.

About plugin

  • Plugin page: honeypot-comments
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Jun 17, 2014
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: gh0stpr3ss (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /5,587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Honeypot Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.44 ▼1.52
Dashboard /wp-admin3.32 ▼0.0344.84 ▼14.98
Posts /wp-admin/edit.php3.37 ▲0.0144.22 ▼7.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.48 ▼18.20
Media Library /wp-admin/upload.php3.24 ▲0.0134.75 ▲3.68

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Honeypot Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.79 ▼0.568.92 ▲7.1743.06 ▼0.31
Dashboard /wp-admin2,198 ▲245.61 ▲0.0389.66 ▼3.6841.67 ▼1.30
Posts /wp-admin/edit.php2,100 ▲212.00 ▲0.0135.84 ▼2.0436.71 ▲3.88
Add New Post /wp-admin/post-new.php1,530 ▲223.12 ▲0.39670.41 ▲9.8658.64 ▲7.28
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.03109.06 ▼2.6645.63 ▼0.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/honeypot-comments/public/views/public.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: comments, spam

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

The main PHP script in "Honeypot Comments" version 1.1.0 is automatically included on every request by WordPress
110 characters long description:
Add a hidden input field that only spambots will fill in, effectively nuking any comments not made by a human.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin140 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP576281135
JavaScript1415
CSS1010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods642.86%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin