77% click-to-call-button

Code Review | Click to call button

WordPress plugin Click to call button scored77%from 54 tests.

About plugin

  • Plugin page: click-to-call-button
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2015
  • Latest release: Aug 17, 2015
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: andymoore (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /7,110 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲2.04ms] Passed 4 tests

This is a short check of server-side resources used by Click to call button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.40 ▲2.60
Dashboard /wp-admin3.31 ▲0.0148.99 ▼0.94
Posts /wp-admin/edit.php3.36 ▲0.0148.73 ▲1.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.81 ▲11.67
Media Library /wp-admin/upload.php3.23 ▲0.0136.24 ▲4.61
Click to Call Button /wp-admin/options-general.php?page=click-to-call-button3.1829.30

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for Click to call button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6613.36 ▼1.022.16 ▼0.0148.76 ▲4.08
Dashboard /wp-admin2,229 ▲415.07 ▼0.79109.84 ▼6.7140.89 ▼3.22
Posts /wp-admin/edit.php2,117 ▲252.29 ▲0.2442.41 ▲5.1737.52 ▲2.33
Add New Post /wp-admin/post-new.php1,540 ▲618.63 ▼4.55601.74 ▼62.5434.23 ▼19.61
Media Library /wp-admin/upload.php1,414 ▲264.53 ▲0.34104.22 ▲6.9044.95 ▲1.96
Click to Call Button /wp-admin/options-general.php?page=click-to-call-button6961.657.9821.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=click-to-call-button
    • > Error in wp-content/plugins/click-to-call-button/includes/functions_and_options.php+55
    Uncaught Error: Cannot use string offset as an array in wp-content/plugins/click-to-call-button/includes/functions_and_options.php:55
    Stack trace:
    #0 wp-content/plugins/click-to-call-button/admin/ctcb_admin.php(19): ctcb_get_options()
    #1 wp-includes/class-wp-hook.php(310): ctcb_admin_panel()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/click-to-call-button/includes/ctcb_public_facing.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/click-to-call-button/includes/functions_and_options.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-call-button/includes/ctcb_callback_handlers.php:294
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-call-button/admin/ctcb_admin.php:465
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/click-to-call-button/click-to-call-button-plugin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #10, #11, #12, #13, #14, #15, #16, #17, #18, #8, #9 in click-to-call-button/assets to your readme.txt
The official readme.txt might help

click-to-call-button/click-to-call-button-plugin.php 85% from 13 tests

The primary PHP file in "Click to call button" version 0.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 259 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("click-to-call-button.php" instead of "click-to-call-button-plugin.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 detected1,108 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP72522171,104
JavaScript1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.33
▷ Minimum class complexity5.00
▷ Maximum class complexity17.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods952.94%
▷ Public methods1588.24%
▷ Protected methods15.88%
▷ Private methods15.88%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/phone-icon-ready.png0.81KB0.49KB▼ 39.06%
images/phone-icon-active.png0.93KB0.55KB▼ 41.10%