84% hidden-field-to-comments

Code Review | Hidden Comment Field

WordPress plugin Hidden Comment Field scored84%from 54 tests.

About plugin

  • Plugin page: hidden-field-to-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 30, 2018
  • Latest release: Apr 30, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: softm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /554 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Hidden Comment Field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.51 ▼4.93
Dashboard /wp-admin3.32 ▲0.0147.24 ▲2.87
Posts /wp-admin/edit.php3.37 ▲0.0145.62 ▲1.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.76 ▲0.52
Media Library /wp-admin/upload.php3.24 ▲0.0135.94 ▲4.97

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Hidden Comment Field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.29 ▼1.381.89 ▲0.1941.08 ▼12.84
Dashboard /wp-admin2,206 ▲214.85 ▼0.9696.42 ▼7.1635.91 ▼3.94
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0136.49 ▲1.0031.30 ▼5.41
Add New Post /wp-admin/post-new.php1,537 ▲2322.27 ▲4.64654.01 ▲3.3752.64 ▼5.51
Media Library /wp-admin/upload.php1,391 ▲94.15 ▼0.1399.68 ▲1.4640.50 ▼4.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hidden-field-to-comments/main.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hidden-field-to-comments/main.php:20

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

hidden-field-to-comments/hidden_comment_field.php 92% from 13 tests

"Hidden Comment Field" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hidden-field-to-comments.php" instead of "hidden_comment_field.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
Success! There were no dangerous files found in this plugin31 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP273231

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected