79% disqus-conditional-load

Code Review | Disqus Conditional Load

WordPress plugin Disqus Conditional Load scored79%from 54 tests.

About plugin

  • Plugin page: disqus-conditiona...
  • Plugin version: 11.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2014
  • Latest release: Jun 23, 2023
  • Number of updates: 188
  • Update frequency: every 17.6 days
  • Top authors: joelcj91 (100%)

Code review

54 tests

User reviews

63 reviews

Install metrics

6,000+ active /217,788 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼0.92ms] Passed 4 tests

An overview of server-side resources used by Disqus Conditional Load
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4143.06 ▼2.75
Dashboard /wp-admin3.70 ▲0.4054.38 ▼2.22
Posts /wp-admin/edit.php3.75 ▲0.3953.27 ▲0.41
Add New Post /wp-admin/post-new.php6.23 ▲0.35101.64 ▲0.88
Media Library /wp-admin/upload.php3.56 ▲0.3339.92 ▲4.69
DCL Settings /wp-admin/admin.php?page=dcl-settings3.5737.76
Disqus /wp-admin/admin.php?page=disqus3.5337.80
All Comments /wp-admin/edit-comments.php3.6945.77

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
disqus_sync_token
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
dcl_gnrl_options

Browser metrics Passed 4 tests

An overview of browser requirements for Disqus Conditional Load
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.26 ▼0.021.83 ▼0.0140.26 ▼3.90
Dashboard /wp-admin2,208 ▲315.65 ▲0.0790.68 ▼9.7943.42 ▼1.00
Posts /wp-admin/edit.php2,113 ▲131.95 ▼0.0441.33 ▲4.0036.59 ▼0.07
Add New Post /wp-admin/post-new.php1,537 ▲923.17 ▲0.08634.42 ▲5.1058.90 ▼3.04
Media Library /wp-admin/upload.php1,410 ▲74.25 ▲0.0597.48 ▼4.9641.55 ▼6.23
DCL Settings /wp-admin/admin.php?page=dcl-settings1,0461.9423.7433.96
Disqus /wp-admin/admin.php?page=disqus8804.24115.0326.64
All Comments /wp-admin/edit-comments.php1,8192.2833.6030.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • disqus_sync_token
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/disqus-conditional-load/public/views/empty-comments.php
    • > /wp-content/plugins/disqus-conditional-load/admin/class-dcl-admin.php
    • > /wp-content/plugins/disqus-conditional-load/includes/class-dcl-activator-deactivator.php
    • > /wp-content/plugins/disqus-conditional-load/uninstall.php
    • > /wp-content/plugins/disqus-conditional-load/includes/class-dcl-i18n.php
    • > /wp-content/plugins/disqus-conditional-load/disqus-conditional-load.php
    • > /wp-content/plugins/disqus-conditional-load/admin/views/admin-pro.php
    • > /wp-content/plugins/disqus-conditional-load/vendor/disqus-comment-system/public/partials/disqus-public-sso-login-profile.php
    • > /wp-content/plugins/disqus-conditional-load/public/views/disqus-comments.php
    • > /wp-content/plugins/disqus-conditional-load/includes/class-disqus-conditional-load.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/disqus-conditional-load/vendor/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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: disqus conditional load, woocommerce comments, disqus comments, hide disqus, disqus auto load...

disqus-conditional-load/disqus-conditional-load.php Passed 13 tests

The main PHP script in "Disqus Conditional Load" version 11.1.2 is automatically included on every request by WordPress
97 characters long description:
Disqus commenting system for WordPress with advanced features like like lazy load, shortcode etc.

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
There were no executable files found in this plugin47,676 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript108,6417,09945,520
PHP275802,0162,038
CSS2275118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.85
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods120
▷ Static methods75.83%
▷ Public methods8268.33%
▷ Protected methods00.00%
▷ Private methods3831.67%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/buy-now-dcl.png11.45KB3.96KB▼ 65.45%