62% thoughtful-comments

Code Review | FV Thoughtful Comments

WordPress plugin FV Thoughtful Comments scored62%from 54 tests.

About plugin

  • Plugin page: thoughtful-comments
  • Plugin version: 0.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 23, 2009
  • Latest release: Aug 22, 2023
  • Number of updates: 82
  • Update frequency: every 61.8 days
  • Top authors: FolioVision (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /14,053 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.57MB] [CPU: ▼36.35ms] Passed 4 tests

This is a short check of server-side resources used by FV Thoughtful Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2943.10 ▲1.81
Dashboard /wp-admin3.37 ▲0.0728.42 ▼27.08
Posts /wp-admin/edit.php3.37 ▲0.0125.88 ▼32.33
Add New Post /wp-admin/post-new.php3.37 ▼2.5229.53 ▼73.15
Media Library /wp-admin/upload.php3.37 ▲0.1425.03 ▼12.84
FV Thoughtful Comments /wp-admin/options-general.php?page=manage_fv_thoughtful_comments3.3726.37
FV Thoughtful Comments /wp-admin/tools.php?page=fv_thoughtful_comments3.3723.21

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
thoughtful_comments

Browser metrics Passed 4 tests

A check of browser resources used by FV Thoughtful Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.43 ▼0.161.69 ▼0.5343.07 ▼6.50
Dashboard /wp-admin2,215 ▲385.56 ▼0.1093.27 ▲7.0441.04 ▲2.10
Posts /wp-admin/edit.php2,108 ▲82.01 ▼0.0235.85 ▼5.3330.87 ▼6.40
Add New Post /wp-admin/post-new.php1,532 ▲422.93 ▼0.26676.10 ▲8.4064.77 ▲2.04
Media Library /wp-admin/upload.php1,408 ▲54.21 ▲0.0997.83 ▼18.9942.30 ▼6.25
FV Thoughtful Comments /wp-admin/options-general.php?page=manage_fv_thoughtful_comments1,1252.2438.3733.74
FV Thoughtful Comments /wp-admin/tools.php?page=fv_thoughtful_comments8931.6728.4130.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function get_option was called with an argument that is deprecated since version 5.5.0! The "comment_whitelist" option key has been renamed to "comment_previously_approved".
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • thoughtful_comments
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=fv_thoughtful_comments
    • > User deprecated in wp-includes/functions.php+5737
    Function get_option was called with an argument that is deprecated since version 5.5.0! The "comment_whitelist" option key has been renamed to "comment_previously_approved".

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/thoughtful-comments/fv-thoughtful-comments.php:88
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Comment' not found in wp-content/plugins/thoughtful-comments/walkers.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/tools.php?page=fv_thoughtful_comments
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: postboxes is not defined" "ReferenceError: postboxes is not defined\n at HTMLDocument.\u003Canonymous> (/wp-admin/tools.php?page=fv_thoughtful_comments:187:11)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/tools.php?page=fv_thoughtful_comments
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: postboxes is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (The front end comment moderation which editor and admin users are able to see and use.), #2 (Number of unapproved comments shown for editor and admin users in the frontend. The number is highlighted as there are some unapproved comments and there's a tooltip.), #3 (Per-user moderation settings.), #4 (Admin screen settings.)
The official readme.txt might help

thoughtful-comments/fv-thoughtful-comments.php 92% from 13 tests

The principal PHP file in "FV Thoughtful Comments" v. 0.3.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("thoughtful-comments.php" instead of "fv-thoughtful-comments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,525 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP33977081,124
PO File27781221
JavaScript1206128
CSS10137
Markdown111015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity75.00
▷ Minimum class complexity17.00
▷ Maximum class complexity205.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods81
▷ Static methods00.00%
▷ Public methods81100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png32.49KB32.53KB0.00%
screenshot-3.png25.31KB10.19KB▼ 59.73%
screenshot-2.png39.32KB19.24KB▼ 51.08%
screenshot-4.png32.17KB21.20KB▼ 34.10%