84% disqus-conditional-js-load

Code Review | Disqus Conditional JS Load

WordPress plugin Disqus Conditional JS Load scored84%from 54 tests.

About plugin

  • Plugin page: disqus-conditiona...
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9
  • WordPress version: 6.3.1
  • First release: Apr 19, 2014
  • Latest release: Aug 16, 2014
  • Number of updates: 6
  • Update frequency: every 19.8 days
  • Top authors: jp2112 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,666 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.67ms] Passed 4 tests

A check of server-side resources used by Disqus Conditional JS Load
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.98 ▼6.04
Dashboard /wp-admin3.32 ▲0.0152.49 ▼4.76
Posts /wp-admin/edit.php3.37 ▲0.0148.35 ▼4.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.41 ▲0.44
Media Library /wp-admin/upload.php3.24 ▲0.0140.27 ▲6.38

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disqus Conditional JS Load
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼0.781.87 ▲0.0743.83 ▼2.56
Dashboard /wp-admin2,209 ▲244.86 ▼0.9999.65 ▼19.9840.49 ▼4.46
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0436.45 ▼0.8733.68 ▼0.55
Add New Post /wp-admin/post-new.php1,545 ▲1218.37 ▼4.77662.07 ▼13.7463.94 ▲10.07
Media Library /wp-admin/upload.php1,385 ▲34.29 ▲0.12103.36 ▲2.0746.81 ▲0.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/disqus-conditional-js-load/disqus-conditional-js-load.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: disqus, javascript, conditional

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

The entry point to "Disqus Conditional JS Load" version 0.0.4 is a PHP file that has certain tags in its header comment area
65 characters long description:
Stop Disqus from loading JS files on posts/pages without comments

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
There were no executable files found in this plugin42 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP252042

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin