84% simple-ajax-chat

Code Review | Simple Ajax Chat – Add a Fast, Secure Chat Box

WordPress plugin Simple Ajax Chat – Add a Fast, Secure Chat Box scored84%from 54 tests.

About plugin

  • Plugin page: simple-ajax-chat
  • Plugin version: 20231101...
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Nov 15, 2012
  • Latest release: Nov 1, 2023
  • Number of updates: 83
  • Update frequency: every 48.2 days
  • Top authors: specialk (100%)

Code review

54 tests

User reviews

198 reviews

Install metrics

3,000+ active /133,970 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.37MB] [CPU: ▲5.65ms] Passed 4 tests

This is a short check of server-side resources used by Simple Ajax Chat – Add a Fast, Secure Chat Box
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3648.19 ▲8.50
Dashboard /wp-admin3.73 ▲0.4256.65 ▲9.11
Posts /wp-admin/edit.php3.79 ▲0.4352.42 ▲7.62
Add New Post /wp-admin/post-new.php6.23 ▲0.3493.57 ▲1.51
Media Library /wp-admin/upload.php3.57 ▲0.3438.42 ▲4.95
Simple Ajax Chat /wp-admin/options-general.php?page=simple_ajax_chat3.5941.99

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 42 new files
Database: 1 new table, 7 new options
New tables
wp_ajax_chat
New WordPress options
sac_options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simple Ajax Chat – Add a Fast, Secure Chat Box
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,036 ▲27515.19 ▲0.946.90 ▲5.3143.62 ▲4.18
Dashboard /wp-admin2,336 ▲1586.14 ▲0.49105.98 ▲4.0540.54 ▼3.05
Posts /wp-admin/edit.php2,267 ▲1673.40 ▲1.4043.52 ▲6.9931.11 ▼2.42
Add New Post /wp-admin/post-new.php1,529 ▲323.26 ▲0.20583.85 ▼80.9733.21 ▼18.36
Media Library /wp-admin/upload.php1,404 ▲14.10 ▼0.0779.80 ▼16.5041.12 ▼1.68
Simple Ajax Chat /wp-admin/options-general.php?page=simple_ajax_chat2,0163.2940.4674.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-ajax-chat/resources/sac.php
    • > /wp-content/plugins/simple-ajax-chat/resources/nonce.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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: chat box, ajax, instant message, messaging, chat...

simple-ajax-chat/simple-ajax-chat.php 92% from 13 tests

"Simple Ajax Chat – Add a Fast, Secure Chat Box" version 20231101...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "20231101...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,389 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP109972072,325
CSS1332564

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
2 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/sac-logo.png32.19KB11.17KB▼ 65.30%
resources/sac-400.png29.92KB29.92KB0.00%