10% modify-comment-fields

Code Review | Comment Fields [Modify/Disable/Remove]

WordPress plugin Comment Fields [Modify/Disable/Remove] scored10%from 54 tests.

About plugin

  • Plugin page: modify-comment-fi...
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Jul 30, 2022
  • Number of updates: 21
  • Update frequency: every 39.9 days
  • Top authors: ttodua (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /595 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/modify-comment-fields/library_wp.php+2677
    Uncaught Error: Class 'WP_Plugins_List_Table' not found in wp-content/plugins/modify-comment-fields/library_wp.php:2677
    Stack trace:
    #0 wp-content/plugins/modify-comment-fields/library_wp.php(2611): Puvox\wp_plugin->is_not_bulk_activation()
    #1 wp-includes/class-wp-hook.php(312): Puvox\wp_plugin->Puvox\{closure}()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲0.40MB] [CPU: ▲1.05ms] Passed 4 tests

An overview of server-side resources used by Comment Fields [Modify/Disable/Remove]
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4142.03 ▲1.70
Dashboard /wp-admin3.70 ▲0.4045.88 ▼3.52
Posts /wp-admin/edit.php3.75 ▲0.4047.52 ▲2.55
Add New Post /wp-admin/post-new.php6.35 ▲0.4689.97 ▲3.45
Media Library /wp-admin/upload.php3.63 ▲0.4038.64 ▲6.07
Modify Comments fields /wp-admin/options-general.php?page=modify-comment-fields3.6042.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: 1 new table, 8 new options
New tables
wp_modify_comment_fields__errors_log
New WordPress options
widget_recent-comments
widget_theysaidso_widget
modify-comment-fields
theysaidso_admin_options
rcf_sample_random
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Comment Fields [Modify/Disable/Remove]: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.26 ▼1.291.56 ▼0.3037.75 ▼6.43
Dashboard /wp-admin2,213 ▲224.88 ▼0.04109.07 ▼4.8239.13 ▼8.64
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0839.73 ▲5.3334.61 ▼4.40
Add New Post /wp-admin/post-new.php1,540 ▲2123.62 ▲0.10658.79 ▼21.9956.54 ▼9.37
Media Library /wp-admin/upload.php1,395 ▲104.27 ▲0.0493.96 ▼8.8041.90 ▼1.99
Modify Comments fields /wp-admin/options-general.php?page=modify-comment-fields1,2062.1431.6685.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_modify_comment_fields__errors_log
  • This plugin does not fully uninstall, leaving 8 options in the database
    • modify-comment-fields
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • rcf_sample_random
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Puvox\\library' not found in wp-content/plugins/modify-comment-fields/library_wp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

modify-comment-fields/index.php 92% from 13 tests

"Comment Fields [Modify/Disable/Remove]" version 1.04's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("modify-comment-fields.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,841 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31,2965,1333,841

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,076)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity351.60
▷ Minimum class complexity21.00
▷ Maximum class complexity1,076.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods849
▷ Static methods10212.01%
▷ Public methods84299.18%
▷ Protected methods00.00%
▷ Private methods70.82%
Functions103
▷ Named functions00.00%
▷ Anonymous functions103100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin