78% gs-facebook-comments

Code Review | WP Social Comments

WordPress plugin WP Social Comments scored78%from 54 tests.

About plugin

  • Plugin page: gs-facebook-comments
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 8, 2017
  • Latest release: Aug 21, 2023
  • Number of updates: 76
  • Update frequency: every 27.8 days
  • Top authors: qsheeraz (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

9,000+ active /146,179 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.18ms] Passed 4 tests

An overview of server-side resources used by WP Social Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.03 ▲0.17
Dashboard /wp-admin3.46 ▲0.1646.68 ▼4.38
Posts /wp-admin/edit.php3.58 ▲0.2249.62 ▲5.30
Add New Post /wp-admin/post-new.php6.06 ▲0.1884.08 ▼19.72
Media Library /wp-admin/upload.php3.39 ▲0.1635.17 ▲3.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Social Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16314.35 ▼0.0235.64 ▲33.4839.88 ▼3.25
Dashboard /wp-admin2,222 ▲345.86 ▲0.98101.02 ▼15.9136.88 ▼6.95
Posts /wp-admin/edit.php2,105 ▲132.01 ▲0.0236.91 ▼3.3134.77 ▲1.66
Add New Post /wp-admin/post-new.php1,538 ▼418.41 ▼0.08648.99 ▲38.6064.59 ▲8.02
Media Library /wp-admin/upload.php1,404 ▲134.21 ▲0.08100.46 ▼1.6142.67 ▼0.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gs-facebook-comments/public/partials/wpfc-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/gs-facebook-comments/admin/partials/wpfc-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gs-facebook-comments/admin/partials/wpfc-admin-right-area.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gs-facebook-comments/admin/partials/wpfc-admin-plugins.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 to be fixed:
  • Screenshots: Add an image for screenshot #3 (screenshot-3.jpg)
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

gs-facebook-comments/wpfc.php 92% from 13 tests

The entry point to "WP Social Comments" version 1.7.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gs-facebook-comments.php" instead of "wpfc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,718 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP14233732835
PO File3326490503
CSS24514367
JavaScript265413

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.14
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods49
▷ Static methods24.08%
▷ Public methods4387.76%
▷ Protected methods00.00%
▷ Private methods612.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin