84% chatbase

Code Review | Chatbase

WordPress plugin Chatbase scored84%from 54 tests.

About plugin

  • Plugin page: chatbase
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2023
  • Latest release: May 24, 2023
  • Number of updates: 11
  • Update frequency: every 6.5 days
  • Top authors: chatbase (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /2,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.26ms] Passed 4 tests

A check of server-side resources used by Chatbase
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.93 ▼3.45
Dashboard /wp-admin3.32 ▲0.0150.50 ▼1.34
Posts /wp-admin/edit.php3.37 ▲0.0143.22 ▲0.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.69 ▼4.78
Media Library /wp-admin/upload.php3.24 ▲0.0135.06 ▲0.89
Chatbase Options /wp-admin/options-general.php?page=chatbase_id3.2031.50

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Chatbase
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,052 ▲30619.00 ▲4.62133.18 ▲130.6740.60 ▼4.61
Dashboard /wp-admin2,210 ▲225.88 ▲1.0099.15 ▼11.8538.74 ▼5.65
Posts /wp-admin/edit.php2,093 ▲72.01 ▼0.0434.55 ▼2.3335.75 ▲1.49
Add New Post /wp-admin/post-new.php1,536 ▲1723.34 ▲0.21592.20 ▼86.3554.80 ▼19.41
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.0297.56 ▼4.5341.21 ▼2.49
Chatbase Options /wp-admin/options-general.php?page=chatbase_id7812.0624.1223.59

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatbase/chatbase.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === chatbase === )
The official readme.txt is a good inspiration

chatbase/chatbase.php Passed 13 tests

"Chatbase" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Embed your Chatbase chatbot on any Wordpress site.

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
No dangerous file extensions were detected363 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1686326
PHP181337

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.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
No PNG files were detected