84% chaport

Code Review | WP Live Chat + Chatbots Plugin for WordPress – Chaport

WordPress plugin WP Live Chat + Chatbots Plugin for WordPress – Chaport scored84%from 54 tests.

About plugin

  • Plugin page: chaport
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2018
  • Latest release: Sep 1, 2023
  • Number of updates: 31
  • Update frequency: every 66.2 days
  • Top authors: chaport (80.65%)vorteq (22.58%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /23,767 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.02MB] [CPU: ▼0.90ms] Passed 4 tests

This is a short check of server-side resources used by WP Live Chat + Chatbots Plugin for WordPress – Chaport
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.93 ▼2.96
Dashboard /wp-admin3.32 ▲0.0244.80 ▲0.15
Posts /wp-admin/edit.php3.37 ▲0.0246.95 ▲1.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.32 ▲6.48
Media Library /wp-admin/upload.php3.25 ▲0.0235.94 ▼1.77
Chaport /wp-admin/options-general.php?page=chaport3.2430.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Live Chat + Chatbots Plugin for WordPress – Chaport
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.21 ▼0.161.79 ▲0.2139.39 ▼3.86
Dashboard /wp-admin2,199 ▲255.57 ▲0.0393.84 ▲9.1341.35 ▲2.38
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0439.77 ▲0.9137.36 ▼1.31
Add New Post /wp-admin/post-new.php1,530 ▲423.26 ▼0.31634.95 ▼25.2751.19 ▲1.70
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0393.84 ▼19.8941.06 ▼9.37
Chaport /wp-admin/options-general.php?page=chaport8622.0324.3626.70

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chaport/includes/snippets/chaport_user_data_snippet.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/chaport/includes/snippets/chaport_status_snippet.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chaport/includes/snippets/chaport_app_id_code_snippet.php:5
    • > PHP Notice
      Undefined variable: status_class in wp-content/plugins/chaport/includes/snippets/chaport_status_snippet.php on line 1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chaport/includes/snippets/chaport_settings_snippet.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chaport/includes/snippets/chaport_installation_code_snippet.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: web chat, chat widget, chat plugin, free live chat, chatbot...

chaport/chaport.php 92% from 13 tests

The main file in "WP Live Chat + Chatbots Plugin for WordPress – Chaport" v. 1.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin542 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP116132362
CSS119091
PO File114040
Markdown17030
JavaScript13019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.17
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes5100.00%
Methods33
▷ Static methods515.15%
▷ Public methods2987.88%
▷ Protected methods13.03%
▷ Private methods39.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin