68% contact-group-button

Code Review | Contact Group Button

WordPress plugin Contact Group Button scored68%from 54 tests.

About plugin

  • Plugin page: contact-group-button
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 12, 2018
  • Latest release: Oct 12, 2018
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: phongphan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,497 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▼0.91MB] [CPU: ▼37.69ms] Passed 4 tests

A check of server-side resources used by Contact Group Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.03 ▲6.17
Dashboard /wp-admin3.05 ▼0.3021.61 ▼35.79
Posts /wp-admin/edit.php3.05 ▼0.3122.42 ▼23.81
Add New Post /wp-admin/post-new.php3.05 ▼2.8422.53 ▼76.49
Media Library /wp-admin/upload.php3.05 ▼0.1821.67 ▼14.66
Contact Group Button /wp-admin/options-general.php?page=p_group_contact_button3.0522.09

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Group Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲16713.42 ▼1.169.86 ▲7.9145.84 ▲4.40
Dashboard /wp-admin2,199 ▲215.61 ▼0.0385.38 ▼11.8340.24 ▼4.61
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0333.34 ▼1.4138.02 ▲3.31
Add New Post /wp-admin/post-new.php1,529 ▲123.62 ▲0.45683.76 ▲59.0654.87 ▲2.96
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.11106.35 ▼13.7145.31 ▼7.42
Contact Group Button /wp-admin/options-general.php?page=p_group_contact_button1,2102.5746.0122.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=p_group_contact_button
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=p_group_contact_button
    • > Notice in wp-content/plugins/contact-group-button/contact-group-button.php+157
    Undefined index: zalo_number

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/contact-group-button/contact-group-button.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: account contact, contact group button, contact, sms icon contact, call...

contact-group-button/contact-group-button.php 92% from 13 tests

"Contact Group Button" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin435 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP14463246
CSS303131
PO File1193842
JavaScript22116

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin