72% chatgen

Code Review | Chatgen

WordPress plugin Chatgen scored72%from 54 tests.

About plugin

  • Plugin page: chatgen
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2019
  • Latest release: Sep 10, 2020
  • Number of updates: 6
  • Update frequency: every 46.2 days
  • Top authors: sambaandsiva (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

30+ active /1,236 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.65ms] Passed 4 tests

Server-side resources used by Chatgen
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.91 ▲5.16
Dashboard /wp-admin3.32 ▲0.0245.69 ▼1.45
Posts /wp-admin/edit.php3.38 ▲0.0244.15 ▼3.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.07 ▼2.36
Media Library /wp-admin/upload.php3.25 ▲0.0232.30 ▲0.38

Server storage [IO: ▲1.05MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Chatgen
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.24 ▼0.131.58 ▼0.0539.30 ▼2.63
Dashboard /wp-admin2,211 ▲315.65 ▼0.0484.81 ▼3.4669.84 ▲26.22
Posts /wp-admin/edit.php2,116 ▲161.99 ▼0.0536.24 ▼0.0332.45 ▼3.21
Add New Post /wp-admin/post-new.php1,563 ▲3723.13 ▼0.56746.76 ▲142.2956.69 ▲7.21
Media Library /wp-admin/upload.php1,416 ▲194.19 ▼0.0496.17 ▼7.9360.10 ▲17.08
Chatgen /wp-admin/menus.php260.420.0813.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/chatgen/chatgen.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatgen/includes/menus.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatgen/includes/embed.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatgen/includes/core.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/menus.php
    • > Network (severe)
    wp-admin/menus.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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 your attention:
  • Screenshots: Add images for these screenshots: #1 (Chat window - minimized), #2 (Chat widget - maximized), #3 (WordPress settings), #4 (Announcement messages)
  • Tags: There are too many tags (40 tag instead of maximum 10)
The official readme.txt might help

chatgen/chatgen.php Passed 13 tests

The main PHP script in "Chatgen" version 3.0.1 is automatically included on every request by WordPress
96 characters long description:
Powerful platform that enables companies to launch a bot with minimum effort and maximum effect.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin179 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP53026145
Markdown113018
SVG10116

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 1.01MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png316.77KB117.15KB▼ 63.02%
screenshot-4.png61.63KB30.77KB▼ 50.08%
assets/chatgen-icon-16x16-white.png2.01KB0.55KB▼ 72.55%
screenshot-1.png338.09KB217.12KB▼ 35.78%
screenshot-2.png313.55KB168.08KB▼ 46.40%