10% vhm-show-comments

Code Review | VHM Show Comments

WordPress plugin VHM Show Comments scored 10% from 54 tests.

About plugin

  • Plugin page: vhm-show-comments
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1
  • WordPress version: 5.9.2
  • First release: Mar 8, 2015
  • Latest release: Mar 16, 2015
  • Number of updates: 12
  • Update frequency: every 0.8 days
  • Top authors: viktormorales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 711 total downloads


Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Error in wp-content/plugins/vhm-show-comments/vhm-show-comments.php+70
    Uncaught Error: Using $this when not in object context in wp-content/plugins/vhm-show-comments/vhm-show-comments.php:70
    Stack trace:
    #0 wp-includes/class-wp-hook.php(307): VHM_Show_Comments::activate()
    #1 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(474): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(689): do_action()

Server metrics [RAM: ▼0.02MB] [CPU: ▼299.99ms] Passed 4 tests

Analyzing server-side resources used by VHM Show Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0153.23 ▲1.68
Dashboard /wp-admin3.41 ▲0.0032.78 ▼1.47
Posts /wp-admin/edit.php3.64 ▲0.0035.81 ▼5.22
Add New Post /wp-admin/post-new.php6.88 ▼0.0995.17 ▼1,192.28
Media Library /wp-admin/upload.php3.29 ▲0.0024.26 ▼1.00

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for VHM Show Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4115.82 ▼0.127.17 ▲1.102.17 ▲0.13
Dashboard /wp-admin2,895 ▲346.14 ▼0.03116.01 ▼29.70155.07 ▼11.81
Posts /wp-admin/edit.php2,694 ▲33.23 ▼0.0159.98 ▼6.51140.71 ▲0.07
Add New Post /wp-admin/post-new.php1,719 ▲5316.96 ▼3.86428.28 ▲10.07164.56 ▲7.74
Media Library /wp-admin/upload.php1,698 ▼05.48 ▼0.05140.56 ▼2.53192.91 ▲7.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

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
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 take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/vhm-show-comments/vhm-show-comments.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/vhm-show-comments/settings.php:1

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, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: tinymce, random, comments, sidebar, shortcode...

vhm-show-comments/vhm-show-comments.php 92% from 13 tests

Analyzing the main PHP file in "VHM Show Comments" version 1.4
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 detected564 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File172106129

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods218.18%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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