90% honeypot-for-wp-comment

Code Review | Honeypot for WP Comment

WordPress plugin Honeypot for WP Comment scored90%from 54 tests.

About plugin

  • Plugin page: honeypot-for-wp-c...
  • Plugin version: 2.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 6.3.1
  • First release: May 26, 2019
  • Latest release: Aug 6, 2021
  • Number of updates: 30
  • Update frequency: every 26.8 days
  • Top authors: prasidhda (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /18,003 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.28MB] [CPU: ▼7.03ms] Passed 4 tests

An overview of server-side resources used by Honeypot for WP Comment
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2437.89 ▲0.03
Dashboard /wp-admin3.64 ▲0.3344.36 ▼3.18
Posts /wp-admin/edit.php3.69 ▲0.3344.98 ▲1.20
Add New Post /wp-admin/post-new.php6.16 ▲0.2781.50 ▼23.95
Media Library /wp-admin/upload.php3.50 ▲0.2734.59 ▼1.00
Settings /wp-admin/admin.php?page=honeypot-wp-comment-settings3.4731.99
Logs /wp-admin/admin.php?page=honeypot-wp-comment-logs3.4733.83

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: 1 new table, 9 new options
New tables
wp_honeypot_wp_comments_logs
New WordPress options
honeypot_wp_comment_db_version
can_compress_scripts
widget_recent-posts
honeypot_advanced
honeypot_basics
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Honeypot for WP Comment
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲5114.14 ▼0.241.97 ▲0.0337.25 ▼3.03
Dashboard /wp-admin2,218 ▲415.53 ▼0.1684.76 ▼10.5239.48 ▼0.77
Posts /wp-admin/edit.php2,123 ▲232.02 ▼0.0232.99 ▼1.2833.85 ▼3.48
Add New Post /wp-admin/post-new.php1,550 ▲2422.86 ▼0.82593.55 ▼85.8155.07 ▲5.91
Media Library /wp-admin/upload.php1,417 ▲144.15 ▼0.0397.04 ▼2.5842.96 ▼2.82
Settings /wp-admin/admin.php?page=honeypot-wp-comment-settings1,0212.0333.1828.23
Logs /wp-admin/admin.php?page=honeypot-wp-comment-logs9212.0025.4834.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: honeypot, email domain restriction, comments, spam, anti spam...

honeypot-for-wp-comment/honeypot-wp-comment.php 92% from 13 tests

The main PHP script in "Honeypot for WP Comment" version 2.2.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("honeypot-for-wp-comment.php" instead of "honeypot-wp-comment.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,591 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP162927761,591

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.18
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods76
▷ Static methods33.95%
▷ Public methods6585.53%
▷ Protected methods00.00%
▷ Private methods1114.47%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin