72% viet-contact

Code Review | Viet contact

WordPress plugin Viet contact scored72%from 54 tests.

About plugin

  • Plugin page: viet-contact
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: Jan 5, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: nhomcaodem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /992 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Viet contact
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0234.34 ▼8.44
Dashboard /wp-admin3.35 ▲0.0462.22 ▲4.73
Posts /wp-admin/edit.php3.40 ▲0.0454.22 ▲0.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.80 ▲0.15
Media Library /wp-admin/upload.php3.27 ▲0.0438.50 ▲3.85
Viet Contact /wp-admin/options-general.php?page=vietcontact-options3.2131.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Viet contact
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲16914.32 ▲0.182.10 ▲0.1744.20 ▼3.71
Dashboard /wp-admin2,202 ▲255.61 ▼0.0693.79 ▲7.1439.96 ▲0.16
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0439.81 ▲2.4634.43 ▼3.38
Add New Post /wp-admin/post-new.php1,529 ▲323.22 ▼0.44650.50 ▼60.5453.74 ▲1.41
Media Library /wp-admin/upload.php1,401 ▲14.24 ▲0.03100.82 ▼11.8342.85 ▼7.66
Viet Contact /wp-admin/options-general.php?page=vietcontact-options9102.0424.5161.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vietcontact-options
    • > Notice in wp-content/plugins/viet-contact/inc/vietcontact-admin.php+45
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viet-contact/Viet-contact.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viet-contact/inc/vietcontact-admin.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/viet-contact/inc/vietcontact-content.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=vietcontact-options
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=vietcontact-options 162 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

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
4 plugin tags: contact, caodem, ihoan, viet contact

viet-contact/Viet-contact.php 92% from 13 tests

"Viet contact" version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("viet-contact.php" instead of "Viet-contact.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected364 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS173188
PHP31120110
SVG70054
JavaScript10012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin