84% wysiwyg-comments-trix

Code Review | WYSIWYG Comments with Trix Editor

WordPress plugin WYSIWYG Comments with Trix Editor scored84%from 54 tests.

About plugin

  • Plugin page: wysiwyg-comments-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2022
  • Latest release: Sep 11, 2022
  • Number of updates: 7
  • Update frequency: every 14.4 days
  • Top authors: jwz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.90ms] Passed 4 tests

Analyzing server-side resources used by WYSIWYG Comments with Trix Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.10 ▼3.68
Dashboard /wp-admin3.34 ▲0.0447.12 ▼4.89
Posts /wp-admin/edit.php3.40 ▲0.0443.13 ▼5.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.35 ▼17.04
Media Library /wp-admin/upload.php3.27 ▲0.0434.25 ▲2.82

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WYSIWYG Comments with Trix Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.37 ▼1.211.70 ▲0.0343.24 ▲2.83
Dashboard /wp-admin2,206 ▲144.88 ▼0.09112.53 ▲1.4343.43 ▲3.53
Posts /wp-admin/edit.php2,086 ▼62.05 ▼0.0136.04 ▼4.2933.79 ▼2.06
Add New Post /wp-admin/post-new.php1,514 ▼1917.63 ▼5.52628.42 ▼2.2656.64 ▲7.53
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0695.40 ▼27.9542.08 ▼9.63

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wysiwyg-comments-trix/trixcomments.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wysiwyg-comments-trix/trunk/trixcomments.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

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
5 plugin tags: trix, html, rich text, wysiwyg, comments

wysiwyg-comments-trix/trixcomments.php 92% from 13 tests

The main PHP file in "WYSIWYG Comments with Trix Editor" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wysiwyg-comments-trix.php" instead of "trixcomments.php")

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 detected393 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24776251
PHP14982142

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1487.50%
▷ Anonymous functions212.50%
Constants0
▷ 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
PNG images were not found in this plugin