68% graphcomment-comment-system

Code Review | GraphComment Comment system

WordPress plugin GraphComment Comment system scored 68% from 54 tests.

About plugin

  • Plugin page: graphcomment-comm...
  • Plugin version: 3.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: Sep 13, 2023
  • Number of updates: 210
  • Update frequency: every 13.3 days
  • Top authors: graphcomment (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

700+ active / 26,844 total downloads

Benchmarks

Plugin footprint 65% 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.72MB] [CPU: ▲6.87ms] Passed 4 tests

This is a short check of server-side resources used by GraphComment Comment system
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7346.59 ▲6.11
Dashboard /wp-admin4.03 ▲0.7356.86 ▲8.31
Posts /wp-admin/edit.php4.08 ▲0.7251.30 ▲1.59
Add New Post /wp-admin/post-new.php6.61 ▲0.72100.45 ▲11.48
Media Library /wp-admin/upload.php3.95 ▲0.7252.98 ▲15.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 96 new files
Database: 1 new table, 8 new options
New tables
wp_gc_comment_pairing
New WordPress options
gc_seo_activated
gc_oauth_redirect_uri
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by GraphComment Comment system
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲11413.18 ▼1.382.07 ▲0.2842.54 ▼4.71
Dashboard /wp-admin2,215 ▲275.98 ▲0.08100.07 ▼15.7480.74 ▲29.28
Posts /wp-admin/edit.php2,116 ▲272.01 ▼0.0434.67 ▼2.2835.50 ▲0.16
Add New Post /wp-admin/post-new.php1,690 ▲17622.43 ▲4.74751.54 ▲95.5856.95 ▲3.25
Media Library /wp-admin/upload.php1,412 ▲244.21 ▲0.06110.84 ▼4.4851.86 ▲1.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_gc_comment_pairing
  • Zombie WordPress options were found after uninstall: 9 options
    • gc_oauth_redirect_uri
    • can_compress_scripts
    • theysaidso_admin_options
    • gc_sync_comments
    • widget_recent-comments
    • gc_seo_activated
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/graphcomment-comment-system/graphcomment.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GcParamsService' not found in wp-content/plugins/graphcomment-comment-system/comments.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_redirect() in wp-content/plugins/graphcomment-comment-system/class/templates/settings_page_create_website.template.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GcImportService' not found in wp-content/plugins/graphcomment-comment-system/class/templates/settings_page_import.template.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/graphcomment-comment-system/lib/WP_Async_Task.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/graphcomment-comment-system/class/templates/settings_page_synchro.template.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/graphcomment-comment-system/lib/WP_Async_Task.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/graphcomment-comment-system/lib/WP_Async_Task.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/graphcomment-comment-system/class/templates/settings_page_general.template.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/graphcomment-comment-system/class/templates/login_success.template.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function header_template() in wp-content/plugins/graphcomment-comment-system/class/templates/settings_page_select_website.template.php:13

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 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
These attributes need to be fixed:
  • Tags: Too many tags (57 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

graphcomment-comment-system/graphcomment.php 92% from 13 tests

The principal PHP file in "GraphComment Comment system" v. 3.7.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("graphcomment-comment-system.php" instead of "graphcomment.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
Good job! No executable or dangerous file extensions detected5,618 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP348066903,157
CSS78756976
JavaScript4126126689
PO File22540508
SVG100288

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.15
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes00.00%
Methods161
▷ Static methods2616.15%
▷ Public methods11470.81%
▷ Protected methods74.35%
▷ Private methods4024.84%
Functions36
▷ Named functions2775.00%
▷ Anonymous functions925.00%
Constants38
▷ Global constants3284.21%
▷ Class constants615.79%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 PNG files occupy 0.16MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
theme/vendors/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
theme/vendors/jquery-ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
theme/images/icon.png0.59KB0.72KB0.00%
theme/vendors/jquery-ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
theme/vendors/jquery-ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%