78% facebook-comments-master

Code Review | TechGasp Comments Master

WordPress plugin TechGasp Comments Master scored78%from 54 tests.

About plugin

  • Plugin page: facebook-comments...
  • Plugin version: 5.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Jul 9, 2013
  • Latest release: Mar 11, 2021
  • Number of updates: 65
  • Update frequency: every 43.1 days
  • Top authors: TechGasp (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

100+ active /89,060 total downloads

Benchmarks

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.03MB] [CPU: ▼0.03ms] Passed 4 tests

Analyzing server-side resources used by TechGasp Comments Master
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.60 ▼1.56
Dashboard /wp-admin3.33 ▲0.0350.39 ▲1.51
Posts /wp-admin/edit.php3.38 ▲0.0347.79 ▲0.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.99 ▼0.70
Media Library /wp-admin/upload.php3.25 ▲0.0335.94 ▲2.83
Add-ons /wp-admin/admin.php?page=facebook-comments-master-admin-addons3.2932.36
Comments Master /wp-admin/admin.php?page=facebook-comments-master3.2628.01
Settings /wp-admin/admin.php?page=facebook-comments-master-admin-settings-wide3.3134.34

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_facebook_comments_master_widget_viral
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_facebook_comments_master_widget_basic

Browser metrics Passed 4 tests

An overview of browser requirements for TechGasp Comments Master
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲7313.44 ▼0.851.71 ▼0.4943.24 ▼8.48
Dashboard /wp-admin2,239 ▲515.85 ▲0.97100.55 ▼15.6678.90 ▲32.22
Posts /wp-admin/edit.php2,125 ▲361.98 ▼0.0736.51 ▼0.5332.98 ▼2.12
Add New Post /wp-admin/post-new.php1,542 ▲823.22 ▼0.19724.28 ▲44.2057.01 ▲1.80
Media Library /wp-admin/upload.php1,418 ▲334.10 ▼0.14113.30 ▲6.7843.73 ▼3.79
Add-ons /wp-admin/admin.php?page=facebook-comments-master-admin-addons1,0342.0127.9236.15
Comments Master /wp-admin/admin.php?page=facebook-comments-master1,7748.27209.2980.55
Settings /wp-admin/admin.php?page=facebook-comments-master-admin-settings-wide1,0102.0624.1431.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_facebook_comments_master_widget_basic
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_facebook_comments_master_widget_viral
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 | 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
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/facebook-comments-master/facebook-comments-master.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-settings-wide.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-widget-basic.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-admin-table-news.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-admin-addons-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-admin-settings-wide.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-admin-settings-wide-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-admin-settings-wide-table-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-admin-table-header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/facebook-comments-master/includes/facebook-comments-master-widget-viral.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=facebook-comments-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=facebook-comments-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=facebook-comments-master
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yx/r/RBH7b7zeA6F.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=facebook-comments-master
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yx/r/RBH7b7zeA6F.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

facebook-comments-master/facebook-comments-master.php Passed 13 tests

"TechGasp Comments Master" version 5.1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
113 characters long description:
TechGasp Comments Master is the professional integration of facebook comments into heavy duty wordpress websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin833 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP144486830
CSS1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
9 PNG files occupy 0.28MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/techgasp-minilogo-16.png1.86KB0.92KB▼ 50.87%
images/techgasp-admin-addons-shortcodes.png21.28KB20.24KB▼ 4.91%
images/techgasp-spammaster-logo.png174.42KB66.22KB▼ 62.04%
images/techgasp-check-yes.png22.22KB7.59KB▼ 65.83%
images/techgasp-admin-addons-updater.png14.03KB13.02KB▼ 7.21%