83% universal-honey-pot

Code Review | Universal Honey Pot

WordPress plugin Universal Honey Pot scored83%from 54 tests.

About plugin

  • Plugin page: universal-honey-pot
  • Plugin version: 5.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 16, 2023
  • Latest release: Jun 27, 2023
  • Number of updates: 12
  • Update frequency: every 0.9 days
  • Top authors: ludwigyou (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /332 total downloads

Benchmarks

Plugin footprint 83% from 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.20MB] [CPU: ▼4.64ms] Passed 4 tests

A check of server-side resources used by Universal Honey Pot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2241.75 ▲2.72
Dashboard /wp-admin3.54 ▲0.2347.05 ▼4.57
Posts /wp-admin/edit.php3.59 ▲0.2349.60 ▲0.31
Add New Post /wp-admin/post-new.php6.05 ▲0.1783.36 ▼17.03
Media Library /wp-admin/upload.php3.40 ▲0.1736.45 ▲5.74
Universal Honey Pot /wp-admin/options-general.php?page=universal-honey-pot-settings3.3833.67

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Universal Honey Pot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.351.61 ▼0.0737.45 ▼1.72
Dashboard /wp-admin2,210 ▲224.89 ▲0.03106.91 ▲3.7937.49 ▼5.87
Posts /wp-admin/edit.php2,096 ▲42.03 ▼0.0240.95 ▼1.4233.83 ▼0.22
Add New Post /wp-admin/post-new.php1,536 ▲123.19 ▲0.09687.47 ▲101.9155.57 ▼13.28
Media Library /wp-admin/upload.php1,392 ▲44.28 ▲0.0597.02 ▼0.6241.69 ▼0.00
Universal Honey Pot /wp-admin/options-general.php?page=universal-honey-pot-settings1,1462.0828.1933.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_themes() in wp-content/plugins/universal-honey-pot/admin/templates/page-settings.php:6

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Requires at least: Invalid plugin version format
  • Tested up to: Invalid plugin version format
The official readme.txt is a good inspiration

universal-honey-pot/universal-honey-pot.php 92% from 13 tests

The main PHP script in "Universal Honey Pot" version 5.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 221 characters long)

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
Good job! No executable or dangerous file extensions detected1,314 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP293361,0631,120
SVG50199
PO File1252875
JSON20015
Markdown1304
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods79
▷ Static methods2025.32%
▷ Public methods7291.14%
▷ Protected methods00.00%
▷ Private methods78.86%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/formidable-forms.png2.52KB1.31KB▼ 47.81%
public/images/gravity-forms.png21.77KB6.37KB▼ 70.74%
public/images/fluent-form.png4.08KB3.21KB▼ 21.43%
public/images/forminator.png2.45KB1.23KB▼ 49.82%
public/images/divi.png28.78KB13.94KB▼ 51.57%