10% vhm-show-comments

Code Review | VHM Show Comments

WordPress plugin VHM Show Comments scored10%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: 6.3.1
  • 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 /833 total downloads

Benchmarks

Plugin footprint 58% 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
  • The plugin did not install without 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(310): VHM_Show_Comments::activate()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.42ms] Passed 4 tests

Server-side resources used by VHM Show Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.22 ▼6.44
Dashboard /wp-admin3.31 ▼0.0452.20 ▼11.45
Posts /wp-admin/edit.php3.36 ▲0.0051.48 ▼3.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.14 ▼8.26
Media Library /wp-admin/upload.php3.23 ▲0.0039.38 ▲0.23

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by VHM Show Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.47 ▲0.181.88 ▲0.0547.86 ▲5.49
Dashboard /wp-admin2,218 ▲154.83 ▼0.00101.58 ▼1.4242.80 ▲0.99
Posts /wp-admin/edit.php2,097 ▲181.99 ▼0.0538.02 ▲0.3936.91 ▲1.70
Add New Post /wp-admin/post-new.php1,545 ▲1923.37 ▲5.97602.54 ▼39.6654.13 ▼13.43
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.10116.09 ▲14.6647.10 ▼0.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > 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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: random, comments, shortcode, tinymce, widget...

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

The primary PHP file in "VHM Show Comments" version 1.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected564 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP27550395
PO File172106129
JavaScript11027
CSS11013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin