10% netrox-sc-live-chat

Code Review | Netrox SC Live Chat

WordPress plugin Netrox SC Live Chat scored 10% from 54 tests.

About plugin

  • Plugin page: netrox-sc-live-chat
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 5.8.1
  • First release: Dec 8, 2016
  • Latest release: Jan 24, 2017
  • Number of updates: 26
  • Update frequency: every 5.7 days
  • Top authors: netrox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 3,210 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5505
    load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

Server metrics [RAM: ▼1.76MB] [CPU: ▼189.53ms] Passed 4 tests

Server-side resources used by Netrox SC Live Chat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼0.965.63 ▼29.07
Dashboard /wp-admin1.89 ▼1.167.10 ▼33.18
Posts /wp-admin/edit.php1.89 ▼1.216.98 ▼41.14
Add New Post /wp-admin/post-new.php1.89 ▼3.547.01 ▼654.74
Media Library /wp-admin/upload.php1.89 ▼1.116.53 ▼26.30

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 3 new options
New WordPress options
netroxsc_enabled
netroxsc_auth_token
netroxsc_valid

Browser metrics Passed 4 tests

This is an overview of browser requirements for Netrox SC Live Chat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,698 ▲12615.92 ▲0.259.88 ▼0.3052.55 ▼2.01
Dashboard /wp-admin2,980 ▲495.92 ▼0.26143.06 ▼13.84135.92 ▲14.39
Posts /wp-admin/edit.php2,773 ▲342.69 ▼0.0067.97 ▼0.1292.61 ▼8.20
Add New Post /wp-admin/post-new.php1,696 ▲1318.78 ▼0.03381.08 ▼10.80112.23 ▼6.19
Media Library /wp-admin/upload.php1,767 ▼404.98 ▼0.05131.30 ▼26.16149.95 ▲24.58

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5505
    load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/netrox-sc-live-chat/inc/invalid.php
    • > /wp-content/plugins/netrox-sc-live-chat/inc/login_form.php
    • > /wp-content/plugins/netrox-sc-live-chat/inc/settings_form.php
    • > /wp-content/plugins/netrox-sc-live-chat/inc/code.php
    • > /wp-content/plugins/netrox-sc-live-chat/netroxsc.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 60 tag instead of maximum 10
You can take inspiration from this readme.txt

netrox-sc-live-chat/netroxsc.php 69% from 13 tests

"Netrox SC Live Chat" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("netrox-sc-live-chat.php" instead of "netroxsc.php")
  • Domain Path: The domain path must begin with a forward slash character ("//")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin686 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP79263562
PO File14045124

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods421.05%
▷ Public methods1368.42%
▷ Protected methods00.00%
▷ Private methods631.58%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png2.86KB0.23KB▼ 91.88%
images/logo.png6.40KB2.25KB▼ 64.81%