84% better-recent-comments

Code Review | Better Recent Comments

WordPress plugin Better Recent Comments scored84%from 54 tests.

About plugin

  • Plugin page: better-recent-com...
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 2, 2016
  • Latest release: Nov 14, 2023
  • Number of updates: 49
  • Update frequency: every 58.0 days
  • Top authors: andykeith (95.92%)amirition (6.12%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /54,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼4.95ms] Passed 4 tests

This is a short check of server-side resources used by Better Recent Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2543.15 ▲0.11
Dashboard /wp-admin3.56 ▲0.2246.78 ▼18.61
Posts /wp-admin/edit.php3.61 ▲0.2652.05 ▲7.95
Add New Post /wp-admin/post-new.php6.08 ▲0.2087.64 ▼4.32
Media Library /wp-admin/upload.php3.42 ▲0.2036.58 ▲3.02

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 108 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_better_recent_comments
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Better Recent Comments: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7014.20 ▼0.151.95 ▲0.1038.28 ▼5.90
Dashboard /wp-admin2,192 ▲175.55 ▼0.1489.93 ▼25.9139.97 ▼5.50
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0237.46 ▼1.5535.42 ▼1.81
Add New Post /wp-admin/post-new.php1,526 ▼022.97 ▼0.25662.24 ▼14.0357.86 ▲6.96
Media Library /wp-admin/upload.php1,397 ▼04.17 ▼0.02112.12 ▲12.6052.83 ▲8.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_better_recent_comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 34× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Lib\\Registerable' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/barn2-lib/src/Rest/Base_Server.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Lib\\Plugin\\Plugin' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/barn2-lib/src/Plugin/Licensed_Plugin.php:16
    • > PHP Warning
      include(vendor/barn2/barn2-lib/.scoper.inc.php): failed to open stream: No such file or directory in wp-content/plugins/better-recent-comments/.scoper.inc.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Lib\\Admin\\Abstract_Plugin_Promo' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/barn2-lib/src/Admin/Plugin_Promo.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Setup_Wizard\\Interfaces\\Pluggable' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/setup-wizard/src/Step.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Lib\\Plugin\\Simple_Plugin' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/barn2-lib/src/Plugin/Premium_Plugin.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Setup_Wizard\\Step' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/setup-wizard/src/Steps/Welcome.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_lib_scoper_config() in wp-content/plugins/better-recent-comments/.scoper.inc.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Lib\\Plugin\\Plugin' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/barn2-lib/src/Plugin/Simple_Plugin.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Barn2\\Plugin\\Better_Recent_Comments\\Dependencies\\Lib\\Registerable' not found in wp-content/plugins/better-recent-comments/dependencies/barn2/barn2-lib/src/Admin/Settings_Scripts.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: You can look at the official readme.txt

better-recent-comments/better-recent-comments.php 92% from 13 tests

Analyzing the main PHP file in "Better Recent Comments" version 1.1.9
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)

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
Everything looks great! No dangerous files found in this plugin6,470 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
PHP833843,1955,515
CSS62017455
JavaScript42834217
PO File36181205
JSON20078

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity10.35
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces18
Interfaces20
Traits2
Classes49
▷ Abstract classes510.20%
▷ Concrete classes4489.80%
▷ Final classes12.27%
Methods527
▷ Static methods11421.63%
▷ Public methods46187.48%
▷ Protected methods71.33%
▷ Private methods5911.20%
Functions12
▷ Named functions541.67%
▷ Anonymous functions758.33%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin