74% fastcomments

Code Review | FastComments

WordPress plugin FastComments scored74%from 54 tests.

About plugin

  • Plugin page: fastcomments
  • Plugin version: 3.12.7
  • PHP compatiblity: 5.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Sep 26, 2023
  • Number of updates: 60
  • Update frequency: every 21.4 days
  • Top authors: winrid (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /3,040 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.51ms] Passed 4 tests

A check of server-side resources used by FastComments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.39 ▼3.96
Dashboard /wp-admin3.33 ▼0.0250.05 ▼17.98
Posts /wp-admin/edit.php3.44 ▲0.0849.62 ▼0.74
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.28 ▼7.35
Media Library /wp-admin/upload.php3.25 ▲0.0238.06 ▲1.09
All Comments /wp-admin/edit-comments.php3.2645.16

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 35 new files
Database: 2 new tables, 10 new options
New tables
wp_fastcomments_event_ids
wp_fastcomments_comment_ids
New WordPress options
theysaidso_admin_options
db_upgraded
fastcomments_token
fastcomments_log_level
fastcomments_version
can_compress_scripts
widget_recent-comments
fc_fastcomments_comment_ids_version
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by FastComments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲5114.28 ▼0.281.64 ▼0.4640.93 ▼0.02
Dashboard /wp-admin2,206 ▲325.57 ▼0.1492.69 ▼1.9842.73 ▲2.80
Posts /wp-admin/edit.php2,114 ▲142.05 ▲0.0536.17 ▲1.7839.41 ▲2.28
Add New Post /wp-admin/post-new.php1,560 ▲3123.32 ▲5.43663.56 ▲11.2757.56 ▲2.71
Media Library /wp-admin/upload.php1,414 ▲144.16 ▼0.03110.33 ▲11.9945.64 ▲3.97
All Comments /wp-admin/edit-comments.php1,8202.2936.9034.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_fastcomments_comment_ids
    • wp_fastcomments_event_ids
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'FastCommentsPublic' not found in wp-content/plugins/fastcomments/admin/fastcomments-admin-advanced-settings-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/fastcomments/admin/fastcomments-admin-manual-sync-view.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'FastCommentsPublic' not found in wp-content/plugins/fastcomments/admin/fastcomments-admin-support-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fastcomments/admin/fastcomments-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fastcomments/admin/fastcomments-admin-setup-view.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'FastCommentsPublic' not found in wp-content/plugins/fastcomments/admin/fastcomments-admin-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/fastcomments/admin/fastcomments-admin-sso-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fastcomments/public/fastcomments-widget-view.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: comment spam, comment system, live comments, live commenting, fast comments...

fastcomments/fastcomments-wordpress-plugin.php 92% from 13 tests

The entry point to "FastComments" version 3.12.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fastcomments.php" instead of "fastcomments-wordpress-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,186 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13192571,649
JavaScript44510455
CSS214081
Markdown1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity50.33
▷ Minimum class complexity28.00
▷ Maximum class complexity67.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods71
▷ Static methods45.63%
▷ Public methods5780.28%
▷ Protected methods00.00%
▷ Private methods1419.72%
Functions19
▷ Named functions1368.42%
▷ Anonymous functions631.58%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/logo.png6.11KB2.54KB▼ 58.45%
admin/images/logo-50.png1.76KB0.78KB▼ 55.64%
admin/images/settings.png7.59KB5.83KB▼ 23.25%
admin/images/css.png5.01KB4.30KB▼ 14.08%
admin/images/support.png7.69KB6.67KB▼ 13.34%