77% smartsupp-live-chat

Code Review | Smartsupp – live chat, chatbots, video recordings

WordPress plugin Smartsupp – live chat, chatbots, video recordings scored77%from 54 tests.

About plugin

  • Plugin page: smartsupp-live-chat
  • Plugin version: 3.6
  • PHP compatiblity: 5.3.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2014
  • Latest release: Sep 18, 2023
  • Number of updates: 150
  • Update frequency: every 22.1 days
  • Top authors: marekgach (68%)huttenbachmedard (26.67%)tomwaw (4%)jansvabik (3.33%)

Code review

54 tests

User reviews

116 reviews

Install metrics

20,000+ active /225,392 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.02ms] Passed 4 tests

Analyzing server-side resources used by Smartsupp – live chat, chatbots, video recordings
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.08 ▼0.82
Dashboard /wp-admin3.42 ▲0.1247.50 ▼8.79
Posts /wp-admin/edit.php3.54 ▲0.1849.79 ▲2.83
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.28 ▼1.31
Media Library /wp-admin/upload.php3.35 ▲0.1241.11 ▲7.89
Smartsupp Live Chat /wp-admin/options-general.php?page=smartsupp3.3633.19

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 66 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
smartsupp
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Smartsupp – live chat, chatbots, video recordings: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.61 ▼0.782.03 ▼0.1944.07 ▲5.38
Dashboard /wp-admin2,225 ▲375.83 ▼0.04100.79 ▼11.1289.43 ▲50.91
Posts /wp-admin/edit.php2,111 ▲221.98 ▼0.0333.76 ▼7.0532.59 ▼3.91
Add New Post /wp-admin/post-new.php1,683 ▲16922.47 ▲4.87692.59 ▼14.3959.20 ▲7.01
Media Library /wp-admin/upload.php1,401 ▲134.26 ▲0.1299.88 ▼5.6876.43 ▲29.38
Smartsupp Live Chat /wp-admin/options-general.php?page=smartsupp9131.7616.7094.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require(wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/chat-code-generator/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/chat-code-generator/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/chat-code-generator/tests/ChatGeneratorTest.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Smartsupp\\Auth\\Request\\HttpRequest' not found in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/php-partner-client/src/Smartsupp/Auth/Request/CurlRequest.php:10
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/chat-code-generator/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/chat-code-generator/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/php-partner-client/tests/Smartsupp/Auth/Request/CurlRequestTest.php:4
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/php-partner-client/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/php-partner-client/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/smartsupp-live-chat/admin/views/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/php-partner-client/tests/Smartsupp/Auth/ApiTest.php:6
    • > PHP Warning
      require(wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/php-partner-client/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/smartsupp-live-chat/vendor/smartsupp/php-partner-client/tests/bootstrap.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=smartsupp
    • > Javascript (severe) in unknown
    /wp-includes/js/dist/i18n.min.js?ver=7701b0c3857f914212ef 1:9103 Uncaught TypeError: Cannot read properties of undefined (reading 'hooks')
    • > GET request to /wp-admin/options-general.php?page=smartsupp
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=smartsupp 225:0 Uncaught ReferenceError: wp is not defined
    • > GET request to /wp-admin/options-general.php?page=smartsupp
    • > Javascript (severe) in unknown
    /wp-admin/js/common.min.js?ver=6.3.1 1:61 Uncaught ReferenceError: wp is not defined

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

smartsupp-live-chat/smartsupp.php 85% from 13 tests

The primary PHP file in "Smartsupp – live chat, chatbots, video recordings" version 3.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 327 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smartsupp-live-chat.php" instead of "smartsupp.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 plugin4,204 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
CSS23341622,284
PHP213756631,486
JSON400160
JavaScript1102104
Markdown231094
YAML26043
XML26032
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.92
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods122
▷ Static methods86.56%
▷ Public methods10182.79%
▷ Protected methods21.64%
▷ Private methods1915.57%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
23 PNG files occupy 5.33MB with 3.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png1,387.45KB431.06KB▼ 68.93%
screenshot-1.png1,048.65KB292.87KB▼ 72.07%
images/logo.png4.56KB2.70KB▼ 40.84%
images/chatbot.png118.80KB36.24KB▼ 69.50%
screenshot-2.png1,254.28KB400.64KB▼ 68.06%