84% live-agent-call

Code Review | Live Agent Call

WordPress plugin Live Agent Call scored84%from 54 tests.

About plugin

  • Plugin page: live-agent-call
  • Plugin version: 0.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9
  • WordPress version: 6.3.1
  • First release: Nov 15, 2017
  • Latest release: Nov 15, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: nabeelee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /860 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.25ms] Passed 4 tests

Analyzing server-side resources used by Live Agent Call
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.26 ▼1.26
Dashboard /wp-admin3.37 ▲0.0750.24 ▼1.57
Posts /wp-admin/edit.php3.42 ▲0.0749.59 ▼2.87
Add New Post /wp-admin/post-new.php5.97 ▲0.0891.88 ▼13.14
Media Library /wp-admin/upload.php3.29 ▲0.0635.81 ▼3.43
Live Agent Call /wp-admin/options-general.php?page=Live-Agent-Call3.2333.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
lac
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Live Agent Call
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲18515.08 ▲0.8827.99 ▲26.0843.26 ▼3.10
Dashboard /wp-admin2,242 ▲575.39 ▲0.49105.74 ▲5.9538.61 ▼8.78
Posts /wp-admin/edit.php2,127 ▲352.39 ▲0.3746.04 ▲4.1948.63 ▲13.46
Add New Post /wp-admin/post-new.php1,541 ▲823.53 ▲0.35631.25 ▲30.2134.78 ▼14.80
Media Library /wp-admin/upload.php1,421 ▲364.88 ▲0.67102.03 ▼5.0541.92 ▼4.40
Live Agent Call /wp-admin/options-general.php?page=Live-Agent-Call1,8563.2860.2942.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • lac
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+102
    Undefined index: customersipdomain
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+105
    Undefined index: customerwss
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+108
    Undefined index: customerauthusername
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+111
    Undefined index: customersipusername
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+114
    Undefined index: customersippassword
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+265
    Undefined index: agentsipdomain
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+266
    Undefined index: agentwss
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+268
    Undefined index: agentauthusername
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+267
    Undefined index: agentsipusername
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Live-Agent-Call
    • > Notice in wp-content/plugins/live-agent-call/Live Agent Call.php+269
    Undefined index: agentsippassword

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
7 plugin tags: click to call, call now, agent, ip calling, live call...

live-agent-call/Live Agent Call.php 92% from 13 tests

The main file in "Live Agent Call" v. 0.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("live-agent-call.php" instead of "Live Agent Call.php")

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
There were no executable files found in this plugin10,695 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,9281,6769,579
CSS18613795
PHP15827321

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
agentdisconnect.png47.98KB18.40KB▼ 61.66%