84% tawkto-manager

Code Review | Tawk.To Manager

WordPress plugin Tawk.To Manager scored84%from 54 tests.

About plugin

  • Plugin page: tawkto-manager
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.4
  • WordPress version: 6.3.1
  • First release: Mar 15, 2016
  • Latest release: Apr 9, 2020
  • Number of updates: 72
  • Update frequency: every 20.7 days
  • Top authors: omnileads (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active /21,470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▲2.26ms] Passed 4 tests

Analyzing server-side resources used by Tawk.To Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.38 ▼2.55
Dashboard /wp-admin3.33 ▲0.0251.30 ▲2.91
Posts /wp-admin/edit.php3.38 ▲0.0250.74 ▲3.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.86 ▲7.14
Media Library /wp-admin/upload.php3.25 ▲0.0241.35 ▲5.51
TawkTo settings /wp-admin/options-general.php?page=ttm-tawkto-manager3.3035.09

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Tawk.To Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲6313.39 ▼0.971.62 ▼0.6838.68 ▼8.96
Dashboard /wp-admin2,204 ▲165.90 ▲1.00111.44 ▼6.2138.88 ▼6.47
Posts /wp-admin/edit.php2,087 ▼22.05 ▲0.0433.21 ▼3.6933.52 ▼2.08
Add New Post /wp-admin/post-new.php1,510 ▼417.71 ▼0.11597.90 ▼85.8353.02 ▲4.72
Media Library /wp-admin/upload.php1,386 ▼54.27 ▲0.0595.73 ▼8.4639.94 ▼5.96
TawkTo settings /wp-admin/options-general.php?page=ttm-tawkto-manager9502.1624.8325.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • ttm_version
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 13× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/tawkto-manager/views/tabs/settings.ctp.php
    • > /wp-content/plugins/tawkto-manager/controllers/ttmoptions.ctrl.php
    • > /wp-content/plugins/tawkto-manager/views/tabs/script.ctp.php
    • > /wp-content/plugins/tawkto-manager/controllers/ttmfrontend.ctrl.php
    • > /wp-content/plugins/tawkto-manager/views/tabs/frontend.ctp.php
    • > /wp-content/plugins/tawkto-manager/controllers/ttm.ctrl.php
    • > /wp-content/plugins/tawkto-manager/includes/options.php
    • > /wp-content/plugins/tawkto-manager/views/tabs/help.ctp.php
    • > /wp-content/plugins/tawkto-manager/controllers/ttmbackend.ctrl.php
    • > /wp-content/plugins/tawkto-manager/views/tabs/backend.ctp.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Show the tawk.to chat on your website
    ), #2 (Advanced mode to enable options for advanced users
    ), #3 (WordPress dashboard settings for user roles
    ), #4 (WooCommerce Page options are enabled in it's installed and active
    ), #5 (Shortcode for posts & pages
    )
You can take inspiration from this readme.txt

tawkto-manager/tawktomanager.php 92% from 13 tests

The principal PHP file in "Tawk.To Manager" v. 2.2.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tawkto-manager.php" instead of "tawktomanager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,542 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP131191961,256
PO File196109286

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity37.00
▷ Minimum class complexity24.00
▷ Maximum class complexity45.00
Average method complexity5.65
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods2890.32%
▷ Public methods2580.65%
▷ Protected methods619.35%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
9 PNG files occupy 0.24MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ico16x16d.png0.63KB0.62KB▼ 1.56%
images/ico16x16b.png0.35KB0.30KB▼ 13.13%
screenshot-2.png20.48KB11.88KB▼ 42.02%
images/ico16x16.png0.69KB0.66KB▼ 4.94%
screenshot-4.png26.22KB15.09KB▼ 42.45%