68% widget4call

Code Review | Widget4Call

WordPress plugin Widget4Call scored 68% from 54 tests.

About plugin

  • Plugin page: widget4call
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3
  • WordPress version: 5.8.1
  • First release: Aug 11, 2014
  • Latest release: Sep 3, 2015
  • Number of updates: 26
  • Update frequency: every 15.1 days
  • Top authors: apidaze (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,504 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.63MB] [CPU: ▼196.19ms] Passed 4 tests

Server-side resources used by Widget4Call
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.00 ▼0.726.58 ▼15.96
Dashboard /wp-admin2.02 ▼1.047.25 ▼38.28
Posts /wp-admin/edit.php2.02 ▼1.097.45 ▼55.90
Add New Post /wp-admin/post-new.php2.02 ▼3.426.57 ▼665.18
Media Library /wp-admin/upload.php2.02 ▼0.997.15 ▼25.39
Delete Widget /wp-admin/admin.php?page=w4c_widget_delete2.026.63
Widget4Call /wp-admin/admin.php?page=widget4call2.026.58
Mes Widgets /wp-admin/admin.php?page=w4c_widgets2.026.65
Ajouter widget /wp-admin/admin.php?page=w4c_widget_form2.027.67
Dev Mode /wp-admin/admin.php?page=w4c_devmode2.028.24
Journal d'appels /wp-admin/admin.php?page=w4c_cdr_log2.029.66
Add externale Widget /wp-admin/admin.php?page=w4c_add_external_widget2.028.75
Votre profil /wp-admin/admin.php?page=w4c_user_profil2.026.83

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 28 new files
Database: 1 new table, 2 new options
New tables
wp_w4c_widget
New WordPress options
widget_w4c_widget
w4c_private_key

Browser metrics Passed 4 tests

A check of browser resources used by Widget4Call
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲20515.97 ▲0.529.53 ▲1.3345.72 ▼2.82
Dashboard /wp-admin3,041 ▲1076.34 ▲0.38138.75 ▼0.66108.71 ▲2.45
Posts /wp-admin/edit.php2,812 ▲732.77 ▲0.0869.08 ▲0.65102.01 ▼1.43
Add New Post /wp-admin/post-new.php2,116 ▲43315.72 ▼0.54368.69 ▼101.18132.77 ▲1.04
Media Library /wp-admin/upload.php1,880 ▲735.20 ▲0.18134.43 ▼12.38114.29 ▼1.78
Delete Widget /wp-admin/admin.php?page=w4c_widget_delete1,0832.5759.1158.17
Widget4Call /wp-admin/admin.php?page=widget4call1,1562.5962.5682.45
Mes Widgets /wp-admin/admin.php?page=w4c_widgets1,1162.5981.8568.64
Ajouter widget /wp-admin/admin.php?page=w4c_widget_form1,1152.7160.2973.30
Dev Mode /wp-admin/admin.php?page=w4c_devmode1,3962.5972.7979.80
Journal d'appels /wp-admin/admin.php?page=w4c_cdr_log1,1162.5961.7879.25
Add externale Widget /wp-admin/admin.php?page=w4c_add_external_widget1,0862.5757.0161.94
Votre profil /wp-admin/admin.php?page=w4c_user_profil1,1162.6060.7376.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the w4c_admin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 2 options in the database
    • widget_w4c_widget
    • w4c_private_key

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=w4c_user_profil
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the w4c_admin_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=w4c_user_profil
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the w4c_widget_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=w4c_user_profil
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=w4c_user_profil
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=w4c_user_profil
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the devmode-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=w4c_user_profil
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the font-awesome handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=w4c_devmode
    • > Notice in wp-content/plugins/widget4call/widget4callDevModePage.php+86
    Undefined index: _id

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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget4call/widget4callWidget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/widget4call/widget4call.php:15

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

widget4call/widget4call.php Passed 13 tests

"Widget4Call" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Click to Call and Web Call Back solution By APIdaze

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,042 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS345701,561
PHP1448161,095
JavaScript22910386

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity8.21
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods38
▷ Static methods1847.37%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/agent3.png5.24KB2.68KB▼ 48.75%
assets/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
assets/img/agent4.png5.12KB2.64KB▼ 48.53%
assets/img/agent2.png13.43KB5.96KB▼ 55.61%
assets/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%