10% swiftchat

Code Review | SwiftChat

WordPress plugin SwiftChat scored10%from 54 tests.

About plugin

  • Plugin page: swiftchat
  • Plugin version: 20200309...
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2020
  • Latest release: Oct 19, 2020
  • Number of updates: 7
  • Update frequency: every 34.6 days
  • Top authors: swiftsales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/swiftchat/includes/swift_sales_integration_plugin_class.php+165
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.90MB] [CPU: ▼56.06ms] Passed 4 tests

Analyzing server-side resources used by SwiftChat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.10 ▼33.46
Dashboard /wp-admin2.12 ▼1.236.23 ▼61.49
Posts /wp-admin/edit.php2.12 ▼1.246.10 ▼39.51
Add New Post /wp-admin/post-new.php2.12 ▼3.776.75 ▼89.79
Media Library /wp-admin/upload.php2.12 ▼1.116.38 ▼29.24

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options
ssi_web_id
ssi_token
db_upgraded
theysaidso_admin_options
ssi_account_id
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for SwiftChat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.77 ▲0.411.94 ▲0.1348.84 ▲5.12
Dashboard /wp-admin2,223 ▲385.85 ▼0.1998.40 ▼4.1342.56 ▼0.76
Posts /wp-admin/edit.php2,109 ▲202.02 ▼0.0336.14 ▼1.1830.52 ▼4.51
Add New Post /wp-admin/post-new.php1,534 ▲1523.38 ▲0.19692.55 ▲4.0354.08 ▼7.11
Media Library /wp-admin/upload.php1,408 ▲234.17 ▼0.0398.35 ▼7.9844.56 ▼3.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/swiftchat/includes/swift_sales_integration_plugin_class.php+165
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • ssi_account_id
    • ssi_web_id
    • ssi_token
    • db_upgraded

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: swiftsales, analytics, swiftchat

swiftchat/ssi_plugin.php 77% from 13 tests

Analyzing the main PHP file in "SwiftChat" version 20200309...
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("swiftchat.php" instead of "ssi_plugin.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "20200309...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin426 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33511240
JavaScript1151152
CSS10034

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1266.67%
▷ Protected methods00.00%
▷ Private methods633.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.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
PNG images were not found in this plugin