84% contact-me-on-zalo

Code Review | Contact Me on Zalo

WordPress plugin Contact Me on Zalo scored84%from 54 tests.

About plugin

  • Plugin page: contact-me-on-zalo
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6.28+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 22, 2019
  • Latest release: Mar 17, 2020
  • Number of updates: 10
  • Update frequency: every 21.4 days
  • Top authors: namncn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

7,000+ active /25,060 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: ▼6.80ms] Passed 4 tests

A check of server-side resources used by Contact Me on Zalo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.28 ▼4.41
Dashboard /wp-admin3.32 ▲0.0245.54 ▼7.50
Posts /wp-admin/edit.php3.37 ▲0.0248.92 ▲0.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.43 ▼15.78
Media Library /wp-admin/upload.php3.24 ▲0.0236.52 ▲4.61

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Contact Me on Zalo: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.72 ▲0.501.78 ▲0.1144.04 ▲3.15
Dashboard /wp-admin2,215 ▲355.55 ▼0.1184.27 ▼7.3987.79 ▲50.11
Posts /wp-admin/edit.php2,120 ▲201.97 ▲0.0036.40 ▼4.4731.39 ▼6.35
Add New Post /wp-admin/post-new.php1,542 ▲522.72 ▼2.22658.90 ▲45.6676.81 ▲4.00
Media Library /wp-admin/upload.php1,420 ▲174.19 ▲0.0298.94 ▲0.6468.49 ▲26.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/contact-me-on-zalo/includes/backend.php:6

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: chat zalo, zalo account, zalo, chat, zalo link

contact-me-on-zalo/contact-me-on-zalo.php Passed 13 tests

The primary PHP file in "Contact Me on Zalo" version 1.0.4 is used by WordPress to initiate all plugin functionality
19 characters long description:
Contact 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
Success! There were no dangerous files found in this plugin522 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS3310230
PHP451134227
PO File1161665

PHP code Passed 2 tests

An overview 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.36
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB 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-1.png9.77KB4.29KB▼ 56.09%
assets/images/zalo-icon.png2.21KB1.07KB▼ 51.72%