77% call-button

Code Review | Call Button

WordPress plugin Call Button scored 77% from 54 tests.

About plugin

  • Plugin page: call-button
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.8
  • WordPress version: 5.8.1
  • First release: Jul 3, 2017
  • Latest release: Jul 3, 2017
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: pushlabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 1,179 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼143.75ms] Passed 4 tests

A check of server-side resources used by Call Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1542.46 ▲20.17
Dashboard /wp-admin3.19 ▲0.1443.46 ▼1.76
Posts /wp-admin/edit.php3.24 ▲0.1344.58 ▼4.85
Add New Post /wp-admin/post-new.php5.41 ▼0.0279.84 ▼557.71
Media Library /wp-admin/upload.php3.07 ▲0.0725.93 ▼10.68
Call Button /wp-admin/options-general.php?page=pushlabs_callbutton3.1228.77

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 380 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for Call Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,738 ▲10116.08 ▲0.598.30 ▲0.4447.86 ▼3.16
Dashboard /wp-admin2,990 ▲626.33 ▲0.35131.95 ▼8.20107.56 ▼11.41
Posts /wp-admin/edit.php2,764 ▲252.77 ▲0.0969.96 ▼0.8086.92 ▼2.40
Add New Post /wp-admin/post-new.php725 ▼7732.27 ▼16.6522.36 ▼354.4413.28 ▼96.52
Media Library /wp-admin/upload.php1,838 ▲285.17 ▲0.17159.82 ▲7.57126.16 ▲6.32
Call Button /wp-admin/options-general.php?page=pushlabs_callbutton1,0052.1938.2674.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=pushlabs_callbutton
    • > Compile error in wp-content/plugins/call-button/inc/vendor/cmb2/includes/types/CMB2_Type_Checkbox.php+35
    Declaration of CMB2_Type_Checkbox::render() must be compatible with CMB2_Type_Text::render($args = Array)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 35× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/call-button/inc/vendor/cmb2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/types/CMB2_Type_Title.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/call-button/inc/vendor/cmb2/includes/CMB2_Field.php:17

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

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === call-button === )
  • Screenshots: These screenshots do not have images: #9 (Call Button Example 3), #10 (Call Button Example 4)
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

call-button/pushlabs-callbutton.php 85% from 13 tests

The primary PHP file in "Call Button" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("call-button.php" instead of "pushlabs-callbutton.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected48,374 lines of code in 214 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78217,88231,544
PHP551,9025,0736,586
CSS151,1261,1394,896
SVG1002,671
Sass14265251,262
JavaScript5243249930
Markdown41710485

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity17.17
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes65
▷ Abstract classes812.31%
▷ Concrete classes5787.69%
▷ Final classes00.00%
Methods462
▷ Static methods7315.80%
▷ Public methods38783.77%
▷ Protected methods7215.58%
▷ Private methods30.65%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants753.85%
▷ Class constants646.15%
▷ Public constants6100.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
20 PNG files occupy 0.18MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/vendor/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
inc/vendor/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
inc/vendor/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
assets/img/radio-button-left.png27.78KB6.92KB▼ 75.09%
inc/vendor/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%