10% wp-call-me-back

Code Review | Quick Contact and Call back widget

WordPress plugin Quick Contact and Call back widget scored10%from 54 tests.

About plugin

  • Plugin page: wp-call-me-back
  • Plugin version: 3.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2015
  • Latest release: Apr 1, 2017
  • Number of updates: 37
  • Update frequency: every 21.4 days
  • Top authors: pigeonhut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /22,205 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-call-me-back/wp-callmeback.php+970
    Methods with the same name as their class will not be constructors in a future version of PHP; wpgcallmeback_Widget has a deprecated constructor

Server metrics [RAM: ▼1.51MB] [CPU: ▼52.59ms] Passed 4 tests

An overview of server-side resources used by Quick Contact and Call back widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.49 ▼0.976.40 ▼33.30
Dashboard /wp-admin2.51 ▼0.847.84 ▼48.54
Posts /wp-admin/edit.php2.51 ▼0.858.14 ▼42.34
Add New Post /wp-admin/post-new.php2.51 ▼3.387.17 ▼86.18
Media Library /wp-admin/upload.php2.51 ▼0.726.18 ▼26.61
Add Dropdown Options /wp-admin/admin.php?page=rcb-best-time2.517.61
Delete Dropdown Options2 /wp-admin/admin.php?page=delete-options-two2.516.97
Delete Dropdown Options /wp-admin/admin.php?page=delete-best-time2.518.19
Add Dropdown Options2 /wp-admin/admin.php?page=rcb-options-two2.517.94
Settings and options /wp-admin/admin.php?page=settings-options2.517.13

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: 3 new tables, 7 new options
New tables
wp_request_a_call_back
wp_drop_down_options
wp_call_back_best_time
New WordPress options
theysaidso_admin_options
widget_wpgcallmeback-widget
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Quick Contact and Call back widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.24 ▼1.011.72 ▼0.1437.04 ▼5.90
Dashboard /wp-admin2,226 ▲385.89 ▲0.81110.73 ▼0.3142.97 ▼3.94
Posts /wp-admin/edit.php2,109 ▲202.04 ▲0.0040.21 ▲4.3135.66 ▲0.94
Add New Post /wp-admin/post-new.php1,535 ▲723.11 ▲5.05650.31 ▲45.0862.17 ▲5.58
Media Library /wp-admin/upload.php1,411 ▲264.23 ▲0.0699.97 ▼0.9742.06 ▼2.35
Add Dropdown Options /wp-admin/admin.php?page=rcb-best-time8231.7627.0823.55
Delete Dropdown Options2 /wp-admin/admin.php?page=delete-options-two2,2502.0840.7447.35
Delete Dropdown Options /wp-admin/admin.php?page=delete-best-time2,2502.0745.2336.11
Add Dropdown Options2 /wp-admin/admin.php?page=rcb-options-two8231.7625.5622.54
Settings and options /wp-admin/admin.php?page=settings-options2,2451.9441.9932.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-call-me-back/wp-callmeback.php+970
    Methods with the same name as their class will not be constructors in a future version of PHP; wpgcallmeback_Widget has a deprecated constructor
  • Zombie tables were found after uninstall: 3 tables
    • wp_request_a_call_back
    • wp_drop_down_options
    • wp_call_back_best_time
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_wpgcallmeback-widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Deprecated in wp-content/plugins/wp-call-me-back/wp-callmeback.php+970
    Methods with the same name as their class will not be constructors in a future version of PHP; wpgcallmeback_Widget has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Deprecated in wp-content/plugins/wp-call-me-back/class/recaptchalib.php+42
    Methods with the same name as their class will not be constructors in a future version of PHP; ReCaptcha has a deprecated constructor
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+35
    Trying to access array offset on value of type bool
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in wpgcallmeback_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+198
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rcb-options-two
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+285
    Undefined variable: getId
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rcb-options-two
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+286
    Undefined index: paged
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rcb-options-two
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+290
    Undefined variable: getBestTime
    • > GET request to /wp-admin/admin.php?page=delete-options-two
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+321
    Undefined index: options
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=delete-best-time
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+712
    Undefined variable: subject
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+153
    session_start(): A session had already been started - ignoring
  • 60 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+893
    Undefined index: area_status
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings-options
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+1483
    Undefined variable: dropdown
    • > GET request to /wp-admin/admin.php?page=delete-best-time
    • > Notice in wp-content/plugins/wp-call-me-back/wp-callmeback.php+361
    Undefined index: best_time

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-call-me-back/class/class-wpg-callback-list-table.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-call-me-back/class/class-wpg-dropdownoptions-list-table.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-call-me-back/class/class-wpg-besttime-list-table.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Please add an image for screenshot #1 ()
The official readme.txt might help

wp-call-me-back/wp-callmeback.php 92% from 13 tests

The main file in "Quick Contact and Call back widget" v. 3.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-call-me-back.php" instead of "wp-callmeback.php")

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
There were no executable files found in this plugin8,517 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG1003,967
PHP73116952,482
CSS42725929
HTML11210665
JavaScript1937474

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity22.50
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods92
▷ Static methods1111.96%
▷ Public methods7480.43%
▷ Protected methods1617.39%
▷ Private methods22.17%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
11 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) images/_vti_cnf/warning.png0.37KB0.00KB▼ 100.00%
(invalid) images/_vti_cnf/notice.png0.37KB0.00KB▼ 100.00%
images/warning.png0.47KB0.45KB▼ 4.14%
images/call-me-btn.png5.07KB2.47KB▼ 51.37%
(invalid) images/_vti_cnf/success.png0.37KB0.00KB▼ 100.00%