84% dx-unanswered-comments

Code Review | DX Unanswered Comments

WordPress plugin DX Unanswered Comments scored84%from 54 tests.

About plugin

  • Plugin page: dx-unanswered-com...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2013
  • Latest release: Jul 26, 2022
  • Number of updates: 21
  • Update frequency: every 153.6 days
  • Top authors: devrix (61.9%)nofearinc (42.86%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /3,507 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.99ms] Passed 4 tests

This is a short check of server-side resources used by DX Unanswered Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0644.27 ▲3.13
Dashboard /wp-admin3.36 ▲0.0650.83 ▲3.34
Posts /wp-admin/edit.php3.48 ▲0.1248.62 ▼3.98
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.76 ▼11.19
Media Library /wp-admin/upload.php3.29 ▲0.0633.65 ▼3.90
DX Unanswered Comments /wp-admin/options-general.php?page=dx-unanswered-comments3.2633.21

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

DX Unanswered Comments: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.25 ▼0.102.05 ▼0.7245.80 ▼3.14
Dashboard /wp-admin2,199 ▲195.61 ▼0.0488.83 ▲0.1040.99 ▼3.50
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0036.34 ▼4.0236.41 ▼5.26
Add New Post /wp-admin/post-new.php1,529 ▲123.20 ▼0.16636.99 ▲26.4650.12 ▲1.92
Media Library /wp-admin/upload.php1,398 ▼54.22 ▲0.04102.30 ▼0.6643.30 ▲0.79
DX Unanswered Comments /wp-admin/options-general.php?page=dx-unanswered-comments8012.0223.6425.20

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dx-unanswered-comments/dxuc-unanswered-comments-admin-page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dx-unanswered-comments/dxuc-unanswered-comments.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dx-unanswered-comments/inc/dxuc-add-comment-count-top.php:9

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: unanswered, admin, replies, comments

dx-unanswered-comments/dxuc-unanswered-comments.php 92% from 13 tests

This is the main PHP file of "DX Unanswered Comments" version 1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dx-unanswered-comments.php" instead of "dxuc-unanswered-comments.php")

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
No dangerous file extensions were detected380 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP484114275
JavaScript20041
PO File18036
Markdown19024
CSS1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.00
▷ Minimum class complexity14.00
▷ Maximum class complexity20.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods422.22%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png37.37KB16.99KB▼ 54.53%
screenshot-1.png88.25KB35.41KB▼ 59.87%