10% comment-form-message

Code Review | Comment Form Message

WordPress plugin Comment Form Message scored10%from 54 tests.

About plugin

  • Plugin page: comment-form-message
  • Plugin version: 1.38
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2013
  • Latest release: Dec 17, 2014
  • Number of updates: 9
  • Update frequency: every 60.3 days
  • Top authors: Abdussamad (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /3,930 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/comment-form-message/includes/class.abd_section.inc.php+77
    Undefined offset: 5

Server metrics [RAM: ▼1.80MB] [CPU: ▼49.48ms] Passed 4 tests

Analyzing server-side resources used by Comment Form Message
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.286.51 ▼33.48
Dashboard /wp-admin2.21 ▼1.108.08 ▼42.58
Posts /wp-admin/edit.php2.21 ▼1.159.02 ▼43.71
Add New Post /wp-admin/post-new.php2.21 ▼3.6810.47 ▼78.13
Media Library /wp-admin/upload.php2.21 ▼1.027.30 ▼26.81
Comment Form Message /wp-admin/options-general.php?page=wpcci_options_page2.218.29

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Comment Form Message
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.27 ▼1.311.69 ▼0.5240.26 ▼2.11
Dashboard /wp-admin2,212 ▲384.87 ▼1.03110.19 ▲8.4739.97 ▼4.62
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0041.12 ▲0.2835.21 ▼2.14
Add New Post /wp-admin/post-new.php6,703 ▲5,16922.66 ▼0.53991.82 ▲348.1679.07 ▲17.71
Media Library /wp-admin/upload.php1,397 ▲94.12 ▼0.0997.49 ▼0.4942.71 ▲0.83
Comment Form Message /wp-admin/options-general.php?page=wpcci_options_page1,6456.71150.58100.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/comment-form-message/includes/class.abd_section.inc.php+77
    Undefined offset: 5
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • abd_libs_version
    • widget_recent-posts
    • wpcci_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • wpcci_just_activated

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpcci_options_page
    • > Notice in wp-content/plugins/comment-form-message/includes/class.abd_meta_box.inc.php+42
    Undefined offset: 5
    • > GET request to /wp-admin/options-general.php?page=wpcci_options_page
    • > Notice in wp-content/plugins/comment-form-message/includes/class.abd_meta_box.inc.php+42
    Undefined offset: 4
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpcci_options_page
    • > Notice in wp-content/plugins/comment-form-message/includes/class.abd_options_page.inc.php+41
    Only variables should be passed by reference
    • > GET request to /wp-admin/options-general.php?page=wpcci_options_page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wpcci_options_page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 42× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'abd_meta_option' not found in wp-content/plugins/comment-form-message/includes/class.abd_date_picker_meta_option.inc.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'abd_foundation' not found in wp-content/plugins/comment-form-message/includes/class.abd_help_tab.inc.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'abd_single_choice_option' not found in wp-content/plugins/comment-form-message/includes/class.abd_inline_radio_option.inc.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'abd_option' not found in wp-content/plugins/comment-form-message/includes/class.abd_date_picker_option.inc.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'abd_textarea_meta_option' not found in wp-content/plugins/comment-form-message/includes/class.abd_wysiwyg_meta_option.inc.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'abd_option' not found in wp-content/plugins/comment-form-message/includes/class.abd_upload_option.inc.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/comment-form-message/comment-form-message.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'abd_text_meta_option' not found in wp-content/plugins/comment-form-message/includes/class.abd_textarea_meta_option.inc.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'abd_meta_option' not found in wp-content/plugins/comment-form-message/includes/abstract.class.abd_multiple_choice_meta_option.inc.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'abd_meta_option' not found in wp-content/plugins/comment-form-message/includes/class.abd_text_meta_option.inc.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
6 plugin tags: comments, comments notice, comments form message, comments policy, comment message...

comment-form-message/comment-form-message.php Passed 13 tests

"Comment Form Message" version 1.38's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
Add a custom message near the comments form on a sitewide and/or per post basis.

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
There were no executable files found in this plugin2,603 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP433324662,238
CSS33566332
PO File191429
JavaScript10134

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.23
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes43
▷ Abstract classes818.60%
▷ Concrete classes3581.40%
▷ Final classes00.00%
Methods229
▷ Static methods00.00%
▷ Public methods17475.98%
▷ Protected methods2711.79%
▷ Private methods2812.23%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
45 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/preview/object-unlocked.png0.64KB0.73KB0.00%
icons/object-locked.png1.79KB1.75KB▼ 2.40%
icons/task-attention.png2.48KB1.86KB▼ 25.16%
includes/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.25KB0.15KB▼ 39.62%
icons/preview/dialog-information.png1.12KB1.28KB0.00%