83% tinet-vn-chat-buttons

Code Review | TINET Chat Buttons

WordPress plugin TINET Chat Buttons scored 83% from 54 tests.

About plugin

  • Plugin page: tinet-vn-chat-but...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Mar 28, 2021
  • Latest release: Mar 31, 2022
  • Number of updates: 9
  • Update frequency: every 41.2 days
  • Top authors: tienhmdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 444 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.04MB] [CPU: ▼3.60ms] Passed 4 tests

A check of server-side resources used by TINET Chat Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.38 ▼6.52
Dashboard /wp-admin3.35 ▲0.0444.47 ▼3.60
Posts /wp-admin/edit.php3.40 ▲0.0446.55 ▼2.20
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.31 ▼2.09
Media Library /wp-admin/upload.php3.27 ▲0.0442.32 ▲8.81
TINET.VN Chat Buttons /wp-admin/options-general.php?page=tinet_chat_buttons3.3031.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for TINET Chat Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲14113.24 ▼1.141.80 ▼0.2754.62 ▲9.47
Dashboard /wp-admin2,210 ▲224.86 ▼0.2495.74 ▼19.9941.01 ▼2.99
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0240.43 ▲4.8335.17 ▲0.20
Add New Post /wp-admin/post-new.php1,545 ▲3118.37 ▲0.71594.36 ▼101.0654.76 ▼8.67
Media Library /wp-admin/upload.php1,392 ▲74.18 ▼0.0294.83 ▼7.5542.65 ▼1.42
TINET.VN Chat Buttons /wp-admin/options-general.php?page=tinet_chat_buttons1,4581.8529.2437.40

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/tinet-vn-chat-buttons/tinet-chat-buttons.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/tinet-vn-chat-buttons/tinet-chat-buttons/tinet-chat-buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/tinet-vn-chat-buttons/tinet-chat-buttons/options-page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is stored in the /assets directory.), #2 (This is the second screen shot)
You can look at the official readme.txt

tinet-vn-chat-buttons/tinet-chat-buttons.php 85% from 13 tests

The main file in "TINET Chat Buttons" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tinet-vn-chat-buttons.php" instead of "tinet-chat-buttons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected837 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34844548
CSS1481284
JavaScript2015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tinet-chat-buttons/img/messenger.png6.47KB3.31KB▼ 48.75%
tinet-chat-buttons/img/instagram.png6.81KB3.31KB▼ 51.49%
screenshot-1.png91.51KB35.90KB▼ 60.77%
tinet-chat-buttons/img/call.png2.62KB1.69KB▼ 35.58%
tinet-chat-buttons/img/zalo.png36.74KB16.11KB▼ 56.15%