84% disqus-recent-comments-widget

Code Review | Disqus Recent Comments Widget

WordPress plugin Disqus Recent Comments Widget scored 84% from 54 tests.

About plugin

  • Plugin page: disqus-recent-com...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.0
  • WordPress version: 6.3.1
  • First release: Apr 17, 2013
  • Latest release: Sep 22, 2014
  • Number of updates: 8
  • Update frequency: every 65.4 days
  • Top authors: DeusMachineLLC (75%)Andrew Bartel (37.5%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active / 23,622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.56ms] Passed 4 tests

A check of server-side resources used by Disqus Recent Comments Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.71 ▼2.57
Dashboard /wp-admin3.42 ▲0.1248.51 ▲0.15
Posts /wp-admin/edit.php3.54 ▲0.1845.11 ▼2.34
Add New Post /wp-admin/post-new.php6.00 ▲0.1283.48 ▼1.48
Media Library /wp-admin/upload.php3.35 ▲0.1235.57 ▲2.32
Disqus Comments /wp-admin/options-general.php?page=disqus_rcw3.3136.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_disqus_recent_comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Disqus Recent Comments Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.19 ▼1.101.67 ▼0.3240.26 ▼2.26
Dashboard /wp-admin2,210 ▲254.88 ▼1.02100.25 ▲0.0239.11 ▼1.37
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0835.06 ▼4.7332.05 ▼6.13
Add New Post /wp-admin/post-new.php1,555 ▲2223.14 ▲0.14656.57 ▲19.0852.74 ▼12.38
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0294.75 ▼7.9940.54 ▼1.05
Disqus Comments /wp-admin/options-general.php?page=disqus_rcw8842.0323.0034.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_disqus_recent_comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/disqus-recent-comments-widget/disqus_recent_comments_widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
4 plugin tags: comments, sidebar, disqus, widget

disqus-recent-comments-widget/disqus_recent_comments_widget.php 92% from 13 tests

Analyzing the main PHP file in "Disqus Recent Comments Widget" version 1.2
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("disqus-recent-comments-widget.php" instead of "disqus_recent_comments_widget.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
Success! There were no dangerous files found in this plugin503 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1114117456
CSS113147

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity30.00
▷ Minimum class complexity6.00
▷ Maximum class complexity54.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2170.00%
▷ Protected methods930.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
2 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png39.71KB15.97KB▼ 59.78%
screenshot-2.png74.98KB33.98KB▼ 54.68%