64% lazy-disqus

Code Review | Lazy Disqus

WordPress plugin Lazy Disqus scored64%from 54 tests.

About plugin

  • Plugin page: lazy-disqus
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.1.0
  • WordPress version: 6.3.1
  • First release: Dec 16, 2014
  • Latest release: Dec 16, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: tangrufus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,279 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▲0.31ms] Passed 4 tests

This is a short check of server-side resources used by Lazy Disqus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1840.91 ▲0.03
Dashboard /wp-admin3.54 ▲0.2452.29 ▲0.63
Posts /wp-admin/edit.php3.59 ▲0.2449.67 ▼0.91
Add New Post /wp-admin/post-new.php6.06 ▲0.1794.10 ▲1.48
Media Library /wp-admin/upload.php3.40 ▲0.1739.83 ▲5.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
lazy_disqus_version
widget_theysaidso_widget
lazy_disqus_settings
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Lazy Disqus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.25 ▲0.101.66 ▼0.1141.17 ▼4.87
Dashboard /wp-admin2,216 ▲395.62 ▼0.0581.26 ▼19.9339.18 ▼5.75
Posts /wp-admin/edit.php2,127 ▲272.07 ▼0.0739.48 ▲3.7738.64 ▲5.52
Add New Post /wp-admin/post-new.php1,550 ▲2418.22 ▼5.34634.73 ▼39.9465.60 ▲16.22
Media Library /wp-admin/upload.php1,423 ▲204.21 ▼0.2098.88 ▼4.3341.55 ▼2.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/lazy-disqus/uninstall.php+46
    Undefined index: checked
  • The plugin did not uninstall correctly, leaving 29 files (0.08MB) in the plugin directory
    • (new file) admin/class-lazy-disqus-updater.php
    • (new file) admin/partials/lazy-disqus-display.php
    • (new file) admin/index.php
    • (new file) admin/class-lazy-disqus-admin.php
    • (new file) LICENSE.txt
    • (new file) admin/class-lazy-disqus-mailing-list-box.php
    • (new file) README.txt
    • (new file) admin/css/lazy-disqus-admin.css
    • (new file) admin/partials/lazy-disqus-mailing-list-box-display.php
    • (new file) admin/partials/lazy-disqus-meta-box-display.php
    • ...
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • lazy_disqus_version
    • theysaidso_admin_options
    • lazy_disqus_settings
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Lazy_Disqus_Option' not found in wp-content/plugins/lazy-disqus/public/partials/lazy-disqus-public-display.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/lazy-disqus/admin/partials/lazy-disqus-meta-box-display.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lazy-disqus/admin/partials/lazy-disqus-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/lazy-disqus/admin/partials/lazy-disqus-mailing-list-box-display.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Disqus in action) image missing
The official readme.txt might help

lazy-disqus/lazy-disqus.php Passed 13 tests

The primary PHP file in "Lazy Disqus" version 1.0.0 is used by WordPress to initiate all plugin functionality
20 characters long description:
Defer Disqus loading

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin797 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP213951,022790
CSS1247

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.29
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods69
▷ Static methods710.14%
▷ Public methods6086.96%
▷ Protected methods00.00%
▷ Private methods913.04%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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