84% click-to-call-or-chat-buttons

Code Review | Click to Call or Chat Buttons

WordPress plugin Click to Call or Chat Buttons scored84%from 54 tests.

About plugin

  • Plugin page: click-to-call-or-...
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Aug 18, 2020
  • Latest release: Feb 10, 2023
  • Number of updates: 21
  • Update frequency: every 43.1 days
  • Top authors: digitalblue (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /7,963 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.21ms] Passed 4 tests

Analyzing server-side resources used by Click to Call or Chat Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.90 ▼1.34
Dashboard /wp-admin3.40 ▲0.1049.11 ▼3.03
Posts /wp-admin/edit.php3.45 ▲0.1047.82 ▼5.26
Add New Post /wp-admin/post-new.php5.98 ▲0.0997.40 ▼10.07
Media Library /wp-admin/upload.php3.32 ▲0.0933.92 ▼2.48
Click to Call or Chat Buttons /wp-admin/options-general.php?page=ctcocb3.3033.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Click to Call or Chat Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.79 ▲0.401.99 ▼0.0342.57 ▲1.98
Dashboard /wp-admin2,213 ▲255.89 ▲0.0798.22 ▼17.0540.46 ▼6.48
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0334.51 ▼6.5836.09 ▼0.06
Add New Post /wp-admin/post-new.php1,545 ▲1217.98 ▼5.47631.92 ▼31.1455.47 ▲5.48
Media Library /wp-admin/upload.php1,392 ▲44.18 ▲0.0199.17 ▼2.3741.99 ▼2.38
Click to Call or Chat Buttons /wp-admin/options-general.php?page=ctcocb2,3572.8176.9435.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • ctcocb
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/click-to-call-or-chat-buttons/ctcocb.php:33

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

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: contact bottom button, call now button, phone whatsapp button, click to call chat, call us button

click-to-call-or-chat-buttons/ctcocb.php 92% from 13 tests

The primary PHP file in "Click to Call or Chat Buttons" version 1.5.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("click-to-call-or-chat-buttons.php" instead of "ctcocb.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
Success! There were no dangerous files found in this plugin593 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24928556
CSS13030
JavaScript1207

PHP code Passed 2 tests

A short review 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 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%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin