89% small-phone-button-basic

Code Review | Click to Call Button

WordPress plugin Click to Call Button scored89%from 54 tests.

About plugin

  • Plugin page: small-phone-butto...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 26, 2021
  • Latest release: Nov 13, 2023
  • Number of updates: 7
  • Update frequency: every 102.9 days
  • Top authors: digital2web (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /6,435 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Click to Call Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.63 ▼3.40
Dashboard /wp-admin3.33 ▼0.0241.51 ▼13.74
Posts /wp-admin/edit.php3.38 ▲0.0249.93 ▲4.43
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.09 ▼13.86
Media Library /wp-admin/upload.php3.25 ▲0.0236.24 ▲4.56

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Click to Call Button: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15113.47 ▼1.277.94 ▲6.2439.95 ▼2.57
Dashboard /wp-admin2,228 ▲575.81 ▲0.2897.15 ▲6.7141.98 ▲2.71
Posts /wp-admin/edit.php2,138 ▲382.31 ▲0.2851.68 ▲16.7239.17 ▲3.64
Add New Post /wp-admin/post-new.php1,552 ▲2623.20 ▼0.46688.47 ▲96.3836.32 ▼22.08
Media Library /wp-admin/upload.php1,427 ▲244.49 ▲0.3598.35 ▼3.0640.49 ▼0.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: button, float, basic, wp, phone

small-phone-button-basic/dg2-phone-button.php 85% from 13 tests

This is the main PHP file of "Click to Call Button" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("small-phone-button-basic.php" instead of "dg2-phone-button.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
There were no executable files found in this plugin1,130 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP152951951,049
CSS26068
SVG7007
JSON1005
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.62
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods71
▷ Static methods2028.17%
▷ Public methods6895.77%
▷ Protected methods00.00%
▷ Private methods34.23%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected