83% group-contact-buttons-pht-blog

Code Review | Call Now - Group Contact Buttons - PHT Blog

WordPress plugin Call Now - Group Contact Buttons - PHT Blog scored83%from 54 tests.

About plugin

  • Plugin page: group-contact-but...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: May 27, 2020
  • Number of updates: 16
  • Update frequency: every 2.6 days
  • Top authors: thanhph (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,552 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.11ms] Passed 4 tests

This is a short check of server-side resources used by Call Now - Group Contact Buttons - PHT Blog
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0847.65 ▲4.58
Dashboard /wp-admin3.39 ▲0.0947.22 ▼3.86
Posts /wp-admin/edit.php3.44 ▲0.0949.58 ▼3.82
Add New Post /wp-admin/post-new.php5.97 ▲0.0995.83 ▼8.14
Media Library /wp-admin/upload.php3.31 ▲0.0936.85 ▼0.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Call Now - Group Contact Buttons - PHT Blog
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11614.81 ▲0.132.78 ▲0.6942.79 ▲3.56
Dashboard /wp-admin2,225 ▲434.87 ▼0.95105.77 ▼1.0639.41 ▼2.07
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0135.27 ▼8.2834.96 ▼3.08
Add New Post /wp-admin/post-new.php1,546 ▲823.22 ▼0.08639.05 ▼14.9357.53 ▲2.98
Media Library /wp-admin/upload.php1,398 ▲104.21 ▲0.06100.46 ▼3.2745.29 ▼2.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/group-contact-buttons-pht-blog/group-contact-buttons.php:13

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
Please take inspiration from this readme.txt

group-contact-buttons-pht-blog/group-contact-buttons.php 77% from 13 tests

The main file in "Call Now - Group Contact Buttons - PHT Blog" v. 2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 215 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("group-contact-buttons-pht-blog.php" instead of "group-contact-buttons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,189 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS53964690
PHP12431476
JavaScript18223

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions15
▷ Named functions15100.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
13 PNG files occupy 0.28MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/email.png71.06KB24.98KB▼ 64.84%
image/zalo.png66.18KB22.17KB▼ 66.51%
image/phone.png11.51KB5.37KB▼ 53.33%
image/support.png5.89KB1.94KB▼ 66.98%
image/skype.png36.72KB15.68KB▼ 57.29%