74% bsocial-comments

Code Review | bSocial comments

WordPress plugin bSocial comments scored74%from 54 tests.

About plugin

  • Plugin page: bsocial-comments
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Nov 4, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: misterbisson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /728 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.99MB] [CPU: ▼40.82ms] Passed 4 tests

An overview of server-side resources used by bSocial comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6018.43 ▼23.55
Dashboard /wp-admin3.06 ▼0.2525.72 ▼27.18
Posts /wp-admin/edit.php3.06 ▼0.3021.50 ▼30.37
Add New Post /wp-admin/post-new.php3.06 ▼2.8322.94 ▼82.19
Media Library /wp-admin/upload.php3.06 ▼0.1717.67 ▼19.81

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for bSocial comments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.38 ▲0.242.83 ▲0.8650.70 ▲8.29
Dashboard /wp-admin2,245 ▲745.64 ▼0.0684.44 ▼10.4945.17 ▲2.61
Posts /wp-admin/edit.php2,129 ▲292.09 ▲0.0341.78 ▼0.2240.38 ▲3.33
Add New Post /wp-admin/post-new.php1,552 ▲2623.48 ▲5.78605.75 ▼79.2659.66 ▲3.81
Media Library /wp-admin/upload.php1,428 ▲314.24 ▼0.0397.43 ▼13.7446.56 ▼2.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/bsocial-comments/components/class-bsocial-comments-register.php+534
    Trying to get property 'base' of non-object
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/bsocial-comments/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bsocial-comments/components/templates/flag-notification-email.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'bSocial_Comments_Feedback' not found in wp-content/plugins/bsocial-comments/components/class-bsocial-comments-feedback-admin.php:3
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/bsocial-comments/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/bsocial-comments/tests/test-sample.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'bSocial_Comments_Featured' not found in wp-content/plugins/bsocial-comments/components/class-bsocial-comments-featured-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function comment_text() in wp-content/plugins/bsocial-comments/components/templates/featured-comment.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_title() in wp-content/plugins/bsocial-comments/components/templates/featured-comment-post.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bsocial-comments/components/class-bsocial-comments-feedback-table.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bsocial-comments/components/templates/featured-comments.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (bSocial includes the JS SDKs you need to add social buttons for Twitter and Facebook, as seen on Tease.FM.), #2 (Easily add many Facebook widgets.), #3 (Incorporate conversations in Twitter and Facebook into your WordPress-native comment stream.), #4 (The Open Graph metadata improves sharing and discoverability of your site.)
The official readme.txt might help

bsocial-comments/bsocial-comments.php Passed 13 tests

The main file in "bSocial comments" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
48 characters long description:
Tools to extend WordPress comment functionality.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,124 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP145226192,443
JavaScript413193506
CSS321091
Bourne Shell115459
XML10014
YAML14011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity41.75
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods126
▷ Static methods00.00%
▷ Public methods126100.00%
▷ Protected methods00.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
No PNG files were detected