78% zweb-social-mobile

Code Review | Zweb Social Mobile - Ứng Dụng Nút Gọi Mobile

WordPress plugin Zweb Social Mobile - Ứng Dụng Nút Gọi Mobile scored 78% from 54 tests.

About plugin

  • Plugin page: zweb-social-mobile
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.1-5.5.1
  • WordPress version: 5.8.1
  • First release: Oct 10, 2020
  • Latest release: Oct 10, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: vithanhlam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Zweb Social Mobile - Ứng Dụng Nút Gọi Mobile
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1439.35 ▲17.86
Dashboard /wp-admin3.09 ▲0.0345.98 ▲4.94
Posts /wp-admin/edit.php3.14 ▲0.0343.34 ▼2.74
Add New Post /wp-admin/post-new.php5.45 ▲0.0188.88 ▼557.81
Media Library /wp-admin/upload.php3.03 ▲0.0330.11 ▼1.45
ZWeb - Social Mobile /wp-admin/options-general.php?page=zweb_social_mobile2.9825.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 4 new options
New WordPress options
_zweb_mobile_contact
_zweb_mobile_messager
_zweb_mobile_zalo
_zweb_mobile_hotline

Browser metrics Passed 4 tests

An overview of browser requirements for Zweb Social Mobile - Ứng Dụng Nút Gọi Mobile
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,752 ▲15615.85 ▲0.2211.13 ▲1.4953.98 ▲10.15
Dashboard /wp-admin2,978 ▲476.06 ▼0.15145.15 ▼8.49109.93 ▼9.95
Posts /wp-admin/edit.php2,744 ▲52.71 ▲0.0159.40 ▼3.3294.21 ▼0.09
Add New Post /wp-admin/post-new.php1,875 ▲37519.09 ▲0.37374.00 ▼15.19108.16 ▼2.17
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.00150.47 ▲2.92111.22 ▼11.41
ZWeb - Social Mobile /wp-admin/options-general.php?page=zweb_social_mobile1,1272.0955.1081.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 4 options
    • _zweb_mobile_contact
    • _zweb_mobile_zalo
    • _zweb_mobile_hotline
    • _zweb_mobile_messager

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=zweb_social_mobile
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=zweb_social_mobile
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zweb-social-mobile/include/zweb-admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zweb-social-mobile/include/zweb-function.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/zweb-social-mobile/index.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: social mobile, social, mobile

zweb-social-mobile/index.php 92% from 13 tests

The primary PHP file in "Zweb Social Mobile - Ứng Dụng Nút Gọi Mobile" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zweb-social-mobile.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin143 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31015143

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.02
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.07MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/messager.png4.21KB2.36KB▼ 43.98%
image-mobile.png318.60KB75.70KB▼ 76.24%
images/hotline.png3.91KB2.11KB▼ 46.03%
image-desktop.png738.19KB164.97KB▼ 77.65%
images/zalo.png6.94KB2.50KB▼ 63.95%