84% compassionate-comments

Code Review | Compassionate Comments

WordPress plugin Compassionate Comments scored84%from 54 tests.

About plugin

  • Plugin page: compassionate-com...
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Jun 4, 2019
  • Latest release: Dec 9, 2020
  • Number of updates: 11
  • Update frequency: every 50.4 days
  • Top authors: iandunn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,272 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.19ms] Passed 4 tests

An overview of server-side resources used by Compassionate Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.36 ▼1.55
Dashboard /wp-admin3.35 ▲0.0555.98 ▲2.15
Posts /wp-admin/edit.php3.40 ▲0.0550.50 ▼4.46
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.64 ▼15.58
Media Library /wp-admin/upload.php3.28 ▲0.0536.24 ▲0.83
Compassionate Comments /wp-admin/options-general.php?page=compassionate-comments3.2636.47

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Compassionate Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲11317.37 ▲2.69124.20 ▲122.2451.49 ▲9.72
Dashboard /wp-admin2,202 ▲285.58 ▼0.0479.64 ▼11.3339.21 ▼5.54
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0034.59 ▼1.8135.76 ▼4.20
Add New Post /wp-admin/post-new.php1,548 ▲2223.09 ▲5.67650.13 ▼6.2157.44 ▲7.16
Media Library /wp-admin/upload.php1,404 ▲14.21 ▼0.0294.12 ▼8.8842.32 ▲0.05
Compassionate Comments /wp-admin/options-general.php?page=compassionate-comments9877.2389.7830.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Compassionate_Comments\\Front_End\\add_action() in wp-content/plugins/compassionate-comments/front-end/front-end.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Compassionate_Comments\\Admin\\add_action() in wp-content/plugins/compassionate-comments/admin/admin.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: moderation, abuse, bullying, toxic, comments

compassionate-comments/bootstrap.php 92% from 13 tests

The main PHP file in "Compassionate Comments" ver. 0.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: The principal plugin file should be the same as the plugin slug ("compassionate-comments.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected982 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin