84% hyvor-talk

Code Review | Comments by Hyvor Talk

WordPress plugin Comments by Hyvor Talk scored84%from 54 tests.

About plugin

  • Plugin page: hyvor-talk
  • Plugin version: 1.2.12
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 16, 2019
  • Latest release: Apr 4, 2023
  • Number of updates: 49
  • Update frequency: every 31.4 days
  • Top authors: hyvor (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /2,832 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Comments by Hyvor Talk
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0936.05 ▼7.86
Dashboard /wp-admin3.39 ▲0.0448.10 ▼17.41
Posts /wp-admin/edit.php3.51 ▲0.1546.23 ▼0.58
Add New Post /wp-admin/post-new.php6.00 ▲0.1082.53 ▼12.77
Media Library /wp-admin/upload.php3.32 ▲0.0836.25 ▲0.51
All Comments /wp-admin/edit-comments.php3.3839.23

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Comments by Hyvor Talk: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,788 ▲4214.72 ▲0.191.96 ▲0.3142.22 ▼1.91
Dashboard /wp-admin2,180 ▲35.54 ▼0.0381.96 ▼6.7039.78 ▼3.02
Posts /wp-admin/edit.php2,088 ▼91.99 ▼0.0236.21 ▲0.5333.09 ▼2.39
Add New Post /wp-admin/post-new.php1,532 ▲618.37 ▼4.83620.52 ▼44.4160.16 ▲0.06
Media Library /wp-admin/upload.php1,388 ▼64.17 ▼0.0896.33 ▲0.3241.62 ▼1.30
All Comments /wp-admin/edit-comments.php1,7942.2838.8534.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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)
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
Almost there! Just fix the following items
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/hyvor-talk/html/v3-component.php:35
    • > PHP Notice
      Undefined index: HYVOR_TALK_PLUGIN_WEBSITE_ID in wp-content/plugins/hyvor-talk/html/variables.php on line 12
    • > PHP Notice
      Undefined index: HYVOR_TALK_PLUGIN_WEBSITE_ID in wp-content/plugins/hyvor-talk/html/variables.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/hyvor-talk/html/variables.php:38
    • > PHP Notice
      Undefined index: HYVOR_TALK_PLUGIN_WEBSITE_ID in wp-content/plugins/hyvor-talk/html/variables.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/hyvor-talk/html/variables.php:38
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/hyvor-talk/html/admin.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/hyvor-talk/html/embed.php on line 14
    • > PHP Notice
      Undefined index: HYVOR_TALK_PLUGIN_WEBSITE_ID in wp-content/plugins/hyvor-talk/html/v3-component.php on line 3
    • > PHP Notice
      Undefined index: HYVOR_TALK_PLUGIN_JS_CONFIG in wp-content/plugins/hyvor-talk/html/embed.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: commenting plugin, commenting system, comments, commenting platform

hyvor-talk/hyvor-talk.php 92% from 13 tests

The main PHP script in "Comments by Hyvor Talk" version 1.2.12 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected666 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP11249313543
CSS18083
JavaScript116839
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.67
▷ Minimum class complexity4.00
▷ Maximum class complexity29.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods821.62%
▷ Public methods3389.19%
▷ Protected methods00.00%
▷ Private methods410.81%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants555.56%
▷ Class constants444.44%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/talk-logo.png19.61KB9.22KB▼ 52.99%