73% live-chat-button

Code Review | AI Content Writing and Chat with ChatGPT

WordPress plugin AI Content Writing and Chat with ChatGPT scored73%from 54 tests.

About plugin

  • Plugin page: live-chat-button
  • Plugin version: 5.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 28, 2022
  • Latest release: Jul 31, 2023
  • Number of updates: 21
  • Update frequency: every 16.3 days
  • Top authors: asanaplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,736 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼1.40ms] Passed 4 tests

Analyzing server-side resources used by AI Content Writing and Chat with ChatGPT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4544.24 ▲2.61
Dashboard /wp-admin3.82 ▲0.4861.36 ▼3.93
Posts /wp-admin/edit.php3.78 ▲0.4256.98 ▲5.44
Add New Post /wp-admin/post-new.php6.76 ▲0.88100.00 ▼9.71
Media Library /wp-admin/upload.php3.59 ▲0.3644.12 ▲5.48

Server storage [IO: ▲3.63MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 132 new files
Database: 4 new tables, 8 new options
New tables
wp_asnp_ewhatsapp_ai_content_layout
wp_asnp_ewhatsapp_whatsapp
wp_asnp_ewhatsapp_account
wp_asnp_ewhatsapp_ai_image_layout
New WordPress options
widget_recent-posts
asnp_ewhatsapp_version
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
asnp_ewhatsapp_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for AI Content Writing and Chat with ChatGPT
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,113 ▲35214.28 ▼0.082.12 ▲0.2652.50 ▲6.06
Dashboard /wp-admin2,522 ▲3455.52 ▼0.0290.99 ▼14.2081.37 ▲34.78
Posts /wp-admin/edit.php2,424 ▲3241.98 ▼0.0340.41 ▲3.4935.12 ▼0.10
Add New Post /wp-admin/post-new.php6,902 ▲5,37623.79 ▲0.771,072.52 ▲371.6041.68 ▼7.05
Media Library /wp-admin/upload.php1,727 ▲3274.22 ▼0.01104.70 ▼10.5163.91 ▲19.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables detected upon uninstall: 4 tables
    • wp_asnp_ewhatsapp_whatsapp
    • wp_asnp_ewhatsapp_account
    • wp_asnp_ewhatsapp_ai_image_layout
    • wp_asnp_ewhatsapp_ai_content_layout
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • asnp_ewhatsapp_version
    • widget_recent-posts
    • asnp_ewhatsapp_db_version
    • 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
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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AsanaPlugins\\WhatsApp\\Registry\\AbstractDependencyType' not found in wp-content/plugins/live-chat-button/src/Registry/SharedType.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AsanaPlugins\\WhatsApp\\Registry\\AbstractDependencyType' not found in wp-content/plugins/live-chat-button/src/Registry/FactoryType.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

live-chat-button/easy-whatsapp.php 77% from 13 tests

The main PHP file in "AI Content Writing and Chat with ChatGPT" ver. 5.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("live-chat-button.php" instead of "easy-whatsapp.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin4,634 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP489749114,346
SVG1500244
JSON90024
JavaScript1202612
CSS7018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity16.10
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces13
Interfaces0
Traits0
Classes41
▷ Abstract classes512.20%
▷ Concrete classes3687.80%
▷ Final classes12.78%
Methods220
▷ Static methods3214.55%
▷ Public methods18985.91%
▷ Protected methods2410.91%
▷ Private methods73.18%
Functions43
▷ Named functions3069.77%
▷ Anonymous functions1330.23%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.53MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/temp18.png29.46KB12.24KB▼ 58.46%
assets/images/temp15.png32.41KB13.00KB▼ 59.89%
assets/images/te1.png25.31KB10.60KB▼ 58.12%
assets/images/temp20.png56.77KB22.44KB▼ 60.48%
assets/images/temp19.png53.58KB20.82KB▼ 61.14%