84% wp-call-button

Code Review | WP Call Button - Easy Click to Call Button for WordPress

WordPress plugin WP Call Button - Easy Click to Call Button for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: wp-call-button
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 3, 2019
  • Latest release: Sep 19, 2023
  • Number of updates: 17
  • Update frequency: every 88.7 days
  • Top authors: peterwilsoncc (35.29%)deb255 (35.29%)tommcfarlin (29.41%)justinahinon (17.65%)

Code review

54 tests

User reviews

9 reviews

Install metrics

40,000+ active /195,082 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.32MB] [CPU: ▲1.93ms] Passed 4 tests

Server-side resources used by WP Call Button - Easy Click to Call Button for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2242.41 ▼1.37
Dashboard /wp-admin3.66 ▲0.3563.26 ▲14.03
Posts /wp-admin/edit.php3.77 ▲0.4152.30 ▲6.08
Add New Post /wp-admin/post-new.php6.24 ▲0.3591.04 ▼1.14
Media Library /wp-admin/upload.php3.58 ▲0.3538.51 ▲4.14
WP Call Button /wp-admin/options-general.php?page=wp-call-button3.6234.58

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
wp-call-button-settings
widget_theysaidso_widget
widget_wp-call-button-widget-main-a

Browser metrics Passed 4 tests

A check of browser resources used by WP Call Button - Easy Click to Call Button for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲13713.28 ▼0.861.74 ▼0.2243.81 ▼2.79
Dashboard /wp-admin2,301 ▲1165.93 ▲0.03102.35 ▲0.8545.03 ▲0.08
Posts /wp-admin/edit.php2,181 ▲922.09 ▼0.0838.58 ▲1.9134.40 ▼0.76
Add New Post /wp-admin/post-new.php6,267 ▲4,73319.00 ▼4.24919.51 ▲241.7654.11 ▲0.45
Media Library /wp-admin/upload.php1,480 ▲894.25 ▲0.0196.31 ▼3.2441.96 ▼4.81
WP Call Button /wp-admin/options-general.php?page=wp-call-button2,9793.8358.9249.08

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Almost there! Just fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-call-button/views/admin_view-about.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Upgrader_Skin' not found in wp-content/plugins/wp-call-button/src/Plugin/WpAmPluginsInstallSkin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-call-button/views/admin_view-static.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-call-button/src/Plugin/WpCallButtonWidget.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-call-button/views/activate_welcome_view.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-call-button/views/admin_view-plugins-holder.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-call-button/views/admin_view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-call-button/views/admin_view-sticky.php:1

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: call me wordpress plugin, call, call now button, clickable phone numbers, call button...

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

The entry point to "WP Call Button - Easy Click to Call Button for WordPress" version 1.4.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)

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 plugin3,799 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript131992491,708
PHP172956361,536
CSS53811508
Sass16245
SVG2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.75
▷ Minimum class complexity2.00
▷ Maximum class complexity76.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods54
▷ Static methods814.81%
▷ Public methods5296.30%
▷ Protected methods00.00%
▷ Private methods23.70%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.45MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flags@2x.png170.28KB68.04KB▼ 60.04%
assets/img/plugin-rp.png24.50KB9.36KB▼ 61.79%
assets/img/bottom-left.png2.65KB1.40KB▼ 47.13%
assets/img/flags.png69.20KB23.42KB▼ 66.16%
assets/img/plugin-wpf.png6.03KB6.28KB0.00%