84% first-contact-chatbots

Code Review | First Contact Chatbots

WordPress plugin First Contact Chatbots scored84%from 54 tests.

About plugin

  • Plugin page: first-contact-cha...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 21, 2021
  • Latest release: Aug 21, 2021
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: firstcontactchatbots (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by First Contact Chatbots
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.80 ▲0.73
Dashboard /wp-admin3.32 ▼0.0249.96 ▼9.99
Posts /wp-admin/edit.php3.37 ▲0.0247.00 ▼5.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.83 ▼12.97
Media Library /wp-admin/upload.php3.25 ▲0.0236.31 ▼3.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
fcch-plugin-settings
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

First Contact Chatbots: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.44 ▲0.211.96 ▲0.2444.23 ▲2.65
Dashboard /wp-admin2,234 ▲345.81 ▼0.07102.59 ▼1.2442.27 ▼2.69
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0034.61 ▼3.5032.95 ▼1.80
Add New Post /wp-admin/post-new.php1,558 ▲2723.29 ▲0.22672.74 ▲8.2467.24 ▲11.84
Media Library /wp-admin/upload.php1,413 ▲134.31 ▲0.12100.99 ▼7.8245.14 ▼1.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • fcch-plugin-settings
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/first-contact-chatbots/includes/fcch-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/first-contact-chatbots/fcchatbots.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/first-contact-chatbots/includes/fcch-panel-page.php:4

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)
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: You can take inspiration from this readme.txt

first-contact-chatbots/fcchatbots.php 92% from 13 tests

"First Contact Chatbots" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("first-contact-chatbots.php" instead of "fcchatbots.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected717 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS13517322
JavaScript15717254
PHP3258141

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/chatbot_avatar.png51.72KB17.23KB▼ 66.68%
includes/chaticons.png15.71KB1.91KB▼ 87.82%
includes/button_desc.png33.80KB8.21KB▼ 75.70%