84% hotline-va-zalo

Code Review | Hotline & Zalo Setting

WordPress plugin Hotline & Zalo Setting scored84%from 54 tests.

About plugin

  • Plugin page: hotline-va-zalo
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Mar 16, 2021
  • Latest release: Apr 7, 2021
  • Number of updates: 3
  • Update frequency: every 7.3 days
  • Top authors: dangminhhai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /665 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
This plugin's installer ran successfully

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

Server-side resources used by Hotline & Zalo Setting
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.32 ▼17.36
Dashboard /wp-admin3.35 ▲0.0552.01 ▲3.25
Posts /wp-admin/edit.php3.40 ▲0.0448.71 ▲0.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.82 ▼10.42
Media Library /wp-admin/upload.php3.27 ▲0.0435.61 ▲2.45

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Hotline & Zalo Setting
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲10214.31 ▼0.081.70 ▼0.2654.61 ▲10.22
Dashboard /wp-admin2,208 ▲315.55 ▼0.0285.46 ▼1.6540.66 ▲3.22
Posts /wp-admin/edit.php2,116 ▲192.00 ▼0.0133.91 ▼3.2734.97 ▼2.26
Add New Post /wp-admin/post-new.php1,539 ▲1323.55 ▲0.32705.08 ▲46.7555.84 ▲7.14
Media Library /wp-admin/upload.php1,410 ▲104.08 ▼0.14107.44 ▲2.6745.19 ▲0.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hotline-va-zalo/settings.php
    • > /wp-content/plugins/hotline-va-zalo/hotline-zalo.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: zalo, hotline

hotline-va-zalo/hotline-zalo.php 92% from 13 tests

The primary PHP file in "Hotline & Zalo Setting" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hotline-va-zalo.php" instead of "hotline-zalo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected198 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33110174
CSS10024

PHP code Passed 2 tests

Analyzing 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.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon-zalo.png6.66KB1.95KB▼ 70.73%
img/icon-call.png0.93KB0.37KB▼ 59.98%