10% click2magic-live-chat

Code Review | Click2Magic Live Chat

WordPress plugin Click2Magic Live Chat scored10%from 54 tests.

About plugin

  • Plugin page: click2magic-live-...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2020
  • Latest release: Mar 10, 2020
  • Number of updates: 8
  • Update frequency: every 2.3 days
  • Top authors: click2magic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /399 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/click2magic-live-chat/c2mlivechat.php+97
    Undefined variable: c2mlivechat_sridhar_sriramula

Server metrics [RAM: ▼1.93MB] [CPU: ▼57.42ms] Passed 4 tests

A check of server-side resources used by Click2Magic Live Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.34 ▼41.35
Dashboard /wp-admin2.08 ▼1.226.62 ▼48.90
Posts /wp-admin/edit.php2.08 ▼1.285.69 ▼45.23
Add New Post /wp-admin/post-new.php2.08 ▼3.815.49 ▼94.20
Media Library /wp-admin/upload.php2.08 ▼1.156.02 ▼29.89
Click2Magic Live Chat /wp-admin/options-general.php?page=c2mlivechat_software_tools2.086.12

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Click2Magic Live Chat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7714.74 ▲0.432.61 ▲0.5641.37 ▼0.40
Dashboard /wp-admin2,210 ▲285.81 ▲0.85102.72 ▼15.5238.84 ▼6.98
Posts /wp-admin/edit.php2,090 ▲12.03 ▲0.0434.03 ▼1.1636.83 ▼1.44
Add New Post /wp-admin/post-new.php1,546 ▲918.44 ▼4.67604.30 ▼76.7755.69 ▲4.95
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.0497.81 ▼2.0045.34 ▲0.66
Click2Magic Live Chat /wp-admin/options-general.php?page=c2mlivechat_software_tools7942.0324.6128.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/click2magic-live-chat/c2mlivechat.php+97
    Undefined variable: c2mlivechat_sridhar_sriramula
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=c2mlivechat_software_tools
    • > Notice in wp-content/plugins/click2magic-live-chat/c2mlivechat.php+97
    Undefined variable: c2mlivechat_sridhar_sriramula
    • > GET request to /wp-admin/options-general.php?page=c2mlivechat_software_tools
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'C2MLIVECHAT_SS\SRIDHAR\SRIRAMULA\C2MLIVECHAT_SS_SOFTWARE_TOOLS' does not have a method 'admin_scripts'

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/click2magic-live-chat/includes/c2mlivechat-options.php:85

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: chat, wordpress click2magic live chat, chat plugin, click2magic live support, click2magic live chat plugin...

click2magic-live-chat/c2mlivechat.php 77% from 13 tests

The main PHP file in "Click2Magic Live Chat" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("click2magic-live-chat.php" instead of "c2mlivechat.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 165 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected161 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22220161

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin