84% chat-with-me-on-zalo

Code Review | Chat With Me on Zalo

WordPress plugin Chat With Me on Zalo scored 84% from 54 tests.

About plugin

  • Plugin page: chat-with-me-on-zalo
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 16, 2020
  • Latest release: Nov 16, 2020
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: nghialuu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,351 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.45ms] Passed 4 tests

A check of server-side resources used by Chat With Me on Zalo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0437.28 ▼3.77
Dashboard /wp-admin3.34 ▲0.0451.12 ▲1.35
Posts /wp-admin/edit.php3.39 ▲0.0446.89 ▼2.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.57 ▼12.42
Media Library /wp-admin/upload.php3.26 ▲0.0336.63 ▲1.84

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Chat With Me on Zalo
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲12213.58 ▼1.082.10 ▲0.3838.52 ▼2.98
Dashboard /wp-admin2,214 ▲655.86 ▲0.2098.66 ▼0.4263.98 ▲21.16
Posts /wp-admin/edit.php2,103 ▲142.06 ▲0.0634.41 ▼5.8632.14 ▼7.86
Add New Post /wp-admin/post-new.php1,538 ▲1923.29 ▲0.12702.27 ▲20.6169.89 ▲4.78
Media Library /wp-admin/upload.php1,402 ▲144.20 ▼0.0199.63 ▼9.8446.51 ▲1.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/chat-with-me-on-zalo/includes/backend.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Requires php: Invalid plugin version format
  • Screenshots: Screenshot #1 (Front End of Chat With Me on Zalo.) image not found
The official readme.txt is a good inspiration

chat-with-me-on-zalo/chat-with-me-on-zalo.php Passed 13 tests

Analyzing the main PHP file in "Chat With Me on Zalo" version 1.0
21 characters long description:
Chat With Me on Zalo.

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
There were no executable files found in this plugin437 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS3310230
PHP44389207

PHP code Passed 2 tests

This is a very shot 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.38
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/zalo-2.png4.97KB1.15KB▼ 76.97%
assets/images/zalo-icon.png2.21KB1.07KB▼ 51.72%
assets/images/zalo-1.png167.35KB83.42KB▼ 50.16%