77% disqus-comment-system

Code Review | Disqus Comment System

WordPress plugin Disqus Comment System scored77%from 54 tests.

About plugin

  • Plugin page: disqus-comment-sy...
  • Plugin version: 3.0.23
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Aug 28, 2008
  • Latest release: Apr 19, 2023
  • Number of updates: 154
  • Update frequency: every 36.5 days
  • Top authors: Disqus (73.38%)ryanv12 (22.73%)iamfrancisyo (3.9%)webrender (1.95%)

Code review

54 tests

User reviews

210 reviews

Install metrics

70,000+ active /4,155,980 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.24MB] [CPU: ▼5.06ms] Passed 4 tests

Server-side resources used by Disqus Comment System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2341.96 ▲4.23
Dashboard /wp-admin3.59 ▲0.2546.13 ▼9.67
Posts /wp-admin/edit.php3.64 ▲0.2946.58 ▲0.95
Add New Post /wp-admin/post-new.php6.12 ▲0.2482.80 ▼15.20
Media Library /wp-admin/upload.php3.45 ▲0.2236.87 ▲3.69
All Comments /wp-admin/edit-comments.php3.5239.75

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
disqus_sync_token
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Disqus Comment System: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.21 ▼1.171.77 ▼0.1244.12 ▲1.35
Dashboard /wp-admin2,217 ▲685.86 ▲0.3199.58 ▼0.9342.26 ▲3.41
Posts /wp-admin/edit.php2,097 ▲82.02 ▲0.0433.40 ▼3.1835.24 ▲3.06
Add New Post /wp-admin/post-new.php1,541 ▲823.40 ▲0.17670.44 ▲73.7264.15 ▲21.03
Media Library /wp-admin/upload.php1,390 ▼14.21 ▼0.0797.36 ▲0.6141.98 ▼4.19
All Comments /wp-admin/edit-comments.php1,7992.2933.9034.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 everything seems fine, this is not 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/disqus-comment-system/public/partials/disqus-public-sso-login-profile.php
    • > /wp-content/plugins/disqus-comment-system/admin/partials/disqus-admin-partial.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/disqus-comment-system/public/partials/disqus-public-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

disqus-comment-system/disqus.php 77% from 13 tests

"Disqus Comment System" version 3.0.23's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("disqus-comment-system.php" instead of "disqus.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 detected46,848 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript48,6417,09345,514
PHP132939731,217
CSS1265117

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.29
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods74
▷ Static methods56.76%
▷ Public methods4662.16%
▷ Protected methods00.00%
▷ Private methods2837.84%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin