78% call-now-button

Code Review | Call Now Button - The #1 Click to Call Button for WordPress

WordPress plugin Call Now Button - The #1 Click to Call Button for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: call-now-button
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.4
  • WordPress version: 6.3.1
  • First release: Sep 30, 2012
  • Latest release: Oct 31, 2023
  • Number of updates: 185
  • Update frequency: every 22.0 days
  • Top authors: jasperroel (74.05%)jgrietveld (26.49%)

Code review

54 tests

User reviews

97 reviews

Install metrics

200,000+ active /4,399,489 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 gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.27ms] Passed 4 tests

Server-side resources used by Call Now Button - The #1 Click to Call Button for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.51 ▼4.91
Dashboard /wp-admin3.46 ▲0.1646.15 ▼3.25
Posts /wp-admin/edit.php3.51 ▲0.1649.70 ▲4.80
Add New Post /wp-admin/post-new.php6.06 ▲0.1890.06 ▲3.96
Media Library /wp-admin/upload.php3.39 ▲0.1637.52 ▼0.89
Settings /wp-admin/admin.php?page=call-now-button-settings3.5736.33
My button /wp-admin/admin.php?page=call-now-button3.3636.21
Unlock features /wp-admin/admin.php?page=call-now-button-upgrade3.3633.19

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Call Now Button - The #1 Click to Call Button for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.72 ▲0.291.80 ▼0.2843.20 ▲0.36
Dashboard /wp-admin2,226 ▲465.62 ▼0.0790.79 ▼7.4135.81 ▼7.84
Posts /wp-admin/edit.php2,134 ▲342.01 ▲0.0038.47 ▲3.9435.65 ▲1.26
Add New Post /wp-admin/post-new.php1,552 ▲2423.11 ▲0.01655.73 ▲2.2356.62 ▼1.59
Media Library /wp-admin/upload.php1,428 ▲284.21 ▼0.01100.96 ▼7.9141.59 ▼6.66
Settings /wp-admin/admin.php?page=call-now-button-settings1,2692.3636.9596.13
My button /wp-admin/admin.php?page=call-now-button2,0612.5950.4038.90
Unlock features /wp-admin/admin.php?page=call-now-button-upgrade1,6312.2031.25154.71

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 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 104× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/call-now-button/src/admin/action/partials/class-action-settings-intercom.php
    • > /wp-content/plugins/call-now-button/src/admin/domain/CnbDomainViewUpgrade.php
    • > /wp-content/plugins/call-now-button/src/cli/CNB_CLI_Api.php
    • > /wp-content/plugins/call-now-button/src/admin/button/CnbButton.php
    • > /wp-content/plugins/call-now-button/src/admin/api/CnbAdminCloud.php
    • > /wp-content/plugins/call-now-button/src/admin/api/RemoteTracer.php
    • > /wp-content/plugins/call-now-button/src/admin/domain/partials/CnbDomainViewUpgradeFinished.php
    • > /wp-content/plugins/call-now-button/src/admin/domain/CnbDomainView.php
    • > /wp-content/plugins/call-now-button/src/CallNowButton.php
    • > /wp-content/plugins/call-now-button/src/utils/CnbAdminFunctions.php
  • 207× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/call-now-button/src/vendor/guzzlehttp/psr7/src/BufferStream.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/call-now-button/src/vendor/guzzlehttp/psr7/src/FnStream.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Exception\\RequestException' not found in wp-content/plugins/call-now-button/src/vendor/php-http/client-common/src/Exception/LoopException.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/call-now-button/src/vendor/sentry/sentry/src/HttpClient/Authentication/SentryAuthentication.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Strategy\\DiscoveryStrategy' not found in wp-content/plugins/call-now-button/src/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\Plugin' not found in wp-content/plugins/call-now-button/src/vendor/php-http/client-common/src/Plugin/AddHostPlugin.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Common\\HttpClientPool\\HttpClientPool' not found in wp-content/plugins/call-now-button/src/vendor/php-http/client-common/src/HttpClientPool/LeastUsedClientPool.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Sentry\\Integration\\AbstractErrorListenerIntegration' not found in wp-content/plugins/call-now-button/src/vendor/sentry/sentry/src/Integration/ExceptionListenerIntegration.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/call-now-button/src/vendor/guzzlehttp/psr7/src/PumpStream.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\HttpClient' not found in wp-content/plugins/call-now-button/src/vendor/php-http/client-common/src/PluginClient.php:23

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: call now button, call button, contact button, click to call, convert

call-now-button/call-now-button.php 92% from 13 tests

The main PHP script in "Call Now Button - The #1 Click to Call Button for WordPress" version 1.4.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 778 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin48,118 lines of code in 603 files:
LanguageFilesBlank linesComment linesLines of code
PHP4897,60917,14935,390
Markdown382,09203,632
CSS5475833,350
JSON26002,884
JavaScript303604442,097
TypeScript782554573
YAML5184145
Bourne Shell16018
XML10016
make16013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.80
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces78
Interfaces60
Traits17
Classes399
▷ Abstract classes92.26%
▷ Concrete classes39097.74%
▷ Final classes18246.67%
Methods2,469
▷ Static methods33713.65%
▷ Public methods2,08984.61%
▷ Protected methods502.03%
▷ Private methods33013.37%
Functions202
▷ Named functions5728.22%
▷ Anonymous functions14571.78%
Constants109
▷ Global constants1412.84%
▷ Class constants9587.16%
▷ Public constants6770.53%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
37 PNG files occupy 1.12MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/scheduler.png7.75KB7.75KB0.00%
resources/images/onboarding/nav-position.png20.69KB20.67KB0.06%
resources/images/button-new-single.png2.66KB1.39KB▼ 47.78%
resources/images/onboarding/button-presentation.png8.08KB7.98KB▼ 1.23%
resources/images/button-new-dots.png3.71KB2.34KB▼ 36.96%