78% codeteam-livechat

Code Review | CodeTeam LiveChat

WordPress plugin CodeTeam LiveChat scored78%from 54 tests.

About plugin

  • Plugin page: codeteam-livechat
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: Feb 21, 2015
  • Number of updates: 7
  • Update frequency: every 48.6 days
  • Top authors: codeteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,480 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.82ms] Passed 4 tests

An overview of server-side resources used by CodeTeam LiveChat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.45 ▼7.13
Dashboard /wp-admin3.34 ▲0.0448.24 ▼2.57
Posts /wp-admin/edit.php3.45 ▲0.1053.58 ▲3.27
Add New Post /wp-admin/post-new.php5.92 ▲0.0495.48 ▲11.12
Media Library /wp-admin/upload.php3.26 ▲0.0435.86 ▼0.83
Settings /wp-admin/admin.php?page=ctlc_settings3.2534.23

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

CodeTeam LiveChat: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲8013.33 ▼1.024.49 ▲2.0342.80 ▼5.05
Dashboard /wp-admin2,217 ▲294.90 ▼1.00112.10 ▼6.0178.25 ▲35.37
Posts /wp-admin/edit.php2,118 ▲262.00 ▼0.0038.12 ▲1.3234.58 ▲1.21
Add New Post /wp-admin/post-new.php1,542 ▲2523.25 ▲5.59768.41 ▲105.5653.49 ▲2.36
Media Library /wp-admin/upload.php1,408 ▲204.24 ▼0.0296.89 ▼8.8182.86 ▲36.16
Settings /wp-admin/admin.php?page=ctlc_settings9802.1027.1235.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=ctlc_settings
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/codeteam-livechat/index.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Chat window: A chat with a LiveChat operator.), #2 (Online Visitors: see who's browsing your website in real-time.)
The official readme.txt is a good inspiration

codeteam-livechat/index.php 92% from 13 tests

Analyzing the main PHP file in "CodeTeam LiveChat" version 1.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("codeteam-livechat.php" instead of "index.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 plugin710 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP87573384
JavaScript1293218
CSS1196108

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.33
Average class complexity5.14
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes116.67%
Methods24
▷ Static methods312.50%
▷ Public methods2291.67%
▷ Protected methods28.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.15MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin_files/images/plusminus.png0.45KB0.43KB▼ 2.84%
plugin_files/images/logo.png3.99KB2.06KB▼ 48.35%
screenshot-1.png81.35KB33.57KB▼ 58.74%
screenshot-2.png57.45KB20.25KB▼ 64.75%
plugin_files/images/button_placement.png6.34KB6.09KB▼ 3.97%