78% social-chat

Code Review | Social_Chat

WordPress plugin Social_Chat scored78%from 54 tests.

About plugin

  • Plugin page: social-chat
  • Plugin version: 1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Aug 14, 2018
  • Latest release: Sep 28, 2018
  • Number of updates: 12
  • Update frequency: every 3.9 days
  • Top authors: letscms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /635 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.62ms] Passed 4 tests

An overview of server-side resources used by Social_Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0443.18 ▲0.34
Dashboard /wp-admin3.35 ▲0.0456.56 ▲7.83
Posts /wp-admin/edit.php3.40 ▲0.0451.58 ▲6.74
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.91 ▼9.27
Media Library /wp-admin/upload.php3.27 ▲0.0438.60 ▼0.28
Social Chat /wp-admin/options-general.php?page=letscms_social_chat3.2132.35

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social_Chat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.38 ▲0.102.14 ▲0.5638.34 ▼3.67
Dashboard /wp-admin2,202 ▲225.63 ▼0.0295.57 ▲8.9342.16 ▼0.72
Posts /wp-admin/edit.php2,104 ▲71.98 ▼0.0135.05 ▼3.4835.15 ▼1.60
Add New Post /wp-admin/post-new.php1,536 ▲823.44 ▲0.51642.32 ▼67.2052.22 ▼1.30
Media Library /wp-admin/upload.php1,401 ▲14.20 ▲0.02102.21 ▼5.7545.11 ▲0.39
Social Chat /wp-admin/options-general.php?page=letscms_social_chat9621.9923.0533.77

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+65
    Undefined index: sc_facebook
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+66
    Undefined index: sc_whatsapp
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+67
    Undefined index: sc_email
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+68
    Undefined index: sc_call
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+69
    Undefined index: sc_greeting_message
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+70
    Undefined index: sc_call_to_action
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+71
    Undefined index: sc_button_color
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+72
    Undefined index: sc_position
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+73
    Undefined index: sc_order
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Notice in wp-content/plugins/social-chat/social_chat.php+263
    Undefined index: submit
    • > GET request to /wp-admin/options-general.php?page=letscms_social_chat
    • > Warning in wp-content/plugins/social-chat/social_chat.php+161
    Use of undefined constant submit_nonce - assumed 'submit_nonce' (this will throw an Error in a future version of PHP)

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/social-chat/social_chat.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in social-chat/assets to your readme.txt
The official readme.txt might help

social-chat/social_chat.php 92% from 13 tests

The entry point to "Social_Chat" version 1.0 is a PHP file that has certain tags in its header comment area
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 ("social-chat.php" instead of "social_chat.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
Success! There were no dangerous files found in this plugin247 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13224247

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin