78% click-to-dial

Code Review | Click To Dial - Wp Click To Call Support

WordPress plugin Click To Dial - Wp Click To Call Support scored78%from 54 tests.

About plugin

  • Plugin page: click-to-dial
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2023
  • Latest release: Nov 16, 2023
  • Number of updates: 12
  • Update frequency: every 26.2 days
  • Top authors: themeatelier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /480 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.19MB] [CPU: ▲0.61ms] Passed 4 tests

Analyzing server-side resources used by Click To Dial - Wp Click To Call Support
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5150.25 ▲11.34
Dashboard /wp-admin4.78 ▲1.4758.72 ▲8.46
Posts /wp-admin/edit.php4.83 ▲1.4760.45 ▲18.63
Add New Post /wp-admin/post-new.php6.29 ▲0.4064.75 ▼35.96
Media Library /wp-admin/upload.php4.64 ▲1.4149.32 ▲18.58

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 170 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
ctd-opt
widget_recent-comments

Browser metrics Passed 4 tests

Click To Dial - Wp Click To Call Support: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,059 ▲29716.08 ▲1.9425.23 ▲23.3695.91 ▲51.26
Dashboard /wp-admin2,244 ▲645.55 ▼0.0492.04 ▼2.0944.51 ▲3.01
Posts /wp-admin/edit.php2,159 ▲592.07 ▲0.0740.79 ▼0.8835.82 ▼2.14
Add New Post /wp-admin/post-new.php1,745 ▲21924.82 ▲1.70728.12 ▲74.1940.35 ▼17.51
Media Library /wp-admin/upload.php1,455 ▲524.21 ▼0.03103.23 ▲1.9543.60 ▼0.95
CTD settings /wp-admin/admin.php?page=ctd#tab=ctd-settings4,2164.03100.4277.83
Backup /wp-admin/admin.php?page=ctd#tab=backup4,0933.7061.0766.30
Buttons shortcodes /wp-admin/admin.php?page=ctd#tab=buttons-shortcodes4,0783.5060.9589.83

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • ctd-opt
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 0% 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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/click-to-dial/inc/functions.php
    • > /wp-content/plugins/click-to-dial/click-to-dial.php
    • > /wp-content/plugins/click-to-dial/inc/class-enqueue.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/click-to-dial/view/shortcodes/custom-shortcode.php:11
    • > PHP Warning
      Use of undefined constant CTD_ALERT_MSG - assumed 'CTD_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/click-to-dial/inc/class-enqueue.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-dial/view/chat-bubbles/chat-bubbles.php:2
    • > PHP Warning
      Use of undefined constant CTD_ALERT_MSG - assumed 'CTD_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/click-to-dial/inc/functions.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7 in click-to-dial/assets to your readme.txt
Please take inspiration from this readme.txt

click-to-dial/click-to-dial.php 92% from 13 tests

The main PHP script in "Click To Dial - Wp Click To Call Support" version 1.1.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin25,258 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP712,0891,4299,193
PO File203,1983,5916,500
JavaScript81031396,014
Sass33141,745
CSS680191,335
Markdown1580281
JSON220188
SVG2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity20.58
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity5.70
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes11.75%
Methods246
▷ Static methods3012.20%
▷ Public methods22491.06%
▷ Protected methods72.85%
▷ Private methods156.10%
Functions32
▷ Named functions3196.88%
▷ Anonymous functions13.12%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/bubble-6.png5.89KB2.70KB▼ 54.12%
assets/image/button2.png4.13KB2.67KB▼ 35.39%
admin/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/image/bubble-4.png3.40KB2.48KB▼ 27.09%
assets/image/bubble-8.png4.63KB2.27KB▼ 50.95%