73% wp-ajax-user-chat

Code Review | Wp Ajax User Chat

WordPress plugin Wp Ajax User Chat scored73%from 54 tests.

About plugin

  • Plugin page: wp-ajax-user-chat
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Oct 3, 2017
  • Number of updates: 9
  • Update frequency: every 124.9 days
  • Top authors: ronakdave (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

20+ active /10,873 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.62ms] Passed 4 tests

A check of server-side resources used by Wp Ajax User Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.99 ▼32.71
Dashboard /wp-admin2.10 ▼1.245.71 ▼57.66
Posts /wp-admin/edit.php2.10 ▼1.256.21 ▼45.68
Add New Post /wp-admin/post-new.php2.10 ▼3.785.39 ▼90.42
Media Library /wp-admin/upload.php2.10 ▼1.136.34 ▼29.27

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wp Ajax User Chat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲21314.02 ▼0.3912.12 ▲10.3243.64 ▲2.33
Dashboard /wp-admin2,224 ▲365.79 ▲0.8897.75 ▼6.3240.58 ▼0.92
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0234.11 ▼9.8635.80 ▲0.37
Add New Post /wp-admin/post-new.php1,551 ▲3223.08 ▼0.28645.83 ▼35.0850.71 ▼11.05
Media Library /wp-admin/upload.php1,412 ▲274.17 ▼0.0597.73 ▼8.2942.91 ▼5.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-ajax-handle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • admin
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ajax-user-chat/wp-ajax-user-chat.php:25

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 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-ajax-user-chat === )
  • Screenshots: Screenshot #1 (screenshot-1.jpg) image missing
You can take inspiration from this readme.txt

wp-ajax-user-chat/wp-ajax-user-chat.php Passed 13 tests

The entry point to "Wp Ajax User Chat" version 1.2 is a PHP file that has certain tags in its header comment area
56 characters long description:
Wp Ajax User Chat is a plugin for user to user chatting.

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
Good job! No executable or dangerous file extensions detected1,107 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS24769522
JavaScript42330401
PHP1821184

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_ef8c08_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.27KB0.14KB▼ 47.84%
css/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
css/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%