10% routee-contact-gathering

Code Review | Routee Omnichannel Communication

WordPress plugin Routee Omnichannel Communication scored10%from 54 tests.

About plugin

  • Plugin page: routee-contact-ga...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 4, 2016
  • Latest release: Oct 15, 2018
  • Number of updates: 11
  • Update frequency: every 67.6 days
  • Top authors: atsamdtelecom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /735 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+10
    Use of undefined constant get_routee_list - assumed 'get_routee_list' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.97MB] [CPU: ▼62.08ms] Passed 4 tests

Server-side resources used by Routee Omnichannel Communication
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.38 ▼42.13
Dashboard /wp-admin2.05 ▼1.306.40 ▼61.43
Posts /wp-admin/edit.php2.05 ▼1.315.60 ▼45.53
Add New Post /wp-admin/post-new.php2.05 ▼3.845.15 ▼99.22
Media Library /wp-admin/upload.php2.05 ▼1.185.17 ▼32.44
Routee settings /wp-admin/admin.php?page=wr-settings2.055.32
All forms /wp-admin/admin.php?page=wr-forms-list2.056.74
Form generator /wp-admin/admin.php?page=wr-form-generator2.055.32

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: 4 new tables, 6 new options
New tables
wp_rcg_form_custom_fields
wp_rcg_forms
wp_rcg_form_fields
wp_rcg_form_list
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Routee Omnichannel Communication
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.58 ▼1.181.72 ▼0.0843.56 ▼0.61
Dashboard /wp-admin2,245 ▲575.86 ▲0.96109.76 ▼8.9582.21 ▲36.47
Posts /wp-admin/edit.php2,130 ▲412.01 ▲0.0134.57 ▼1.9834.00 ▼1.04
Add New Post /wp-admin/post-new.php1,548 ▲3417.52 ▼0.01763.73 ▲67.8851.29 ▼13.79
Media Library /wp-admin/upload.php1,418 ▲304.25 ▲0.0298.74 ▼7.4663.11 ▲16.38
Routee settings /wp-admin/admin.php?page=wr-settings8462.0524.0828.64
All forms /wp-admin/admin.php?page=wr-forms-list9152.0630.1027.80
Form generator /wp-admin/admin.php?page=wr-form-generator1,5023.1379.2544.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+10
    Use of undefined constant get_routee_list - assumed 'get_routee_list' (this will throw an Error in a future version of PHP)
  • Zombie tables detected upon uninstall: 4 tables
    • wp_rcg_form_custom_fields
    • wp_rcg_form_list
    • wp_rcg_form_fields
    • wp_rcg_forms
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+10
    Use of undefined constant get_routee_list - assumed 'get_routee_list' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+11
    Use of undefined constant delete_routee_list - assumed 'delete_routee_list' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+12
    Use of undefined constant contact_list - assumed 'contact_list' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+13
    Use of undefined constant delete_contact - assumed 'delete_contact' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+14
    Use of undefined constant form_generation - assumed 'form_generation' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+15
    Use of undefined constant get_custom_field_list - assumed 'get_custom_field_list' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+16
    Use of undefined constant set_routee_field - assumed 'set_routee_field' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+17
    Use of undefined constant get_routee_custom_field_list - assumed 'get_routee_custom_field_list' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+18
    Use of undefined constant deactivate_apply - assumed 'deactivate_apply' (this will throw an Error in a future version of PHP)
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+22
    Use of undefined constant createContact - assumed 'createContact' (this will throw an Error in a future version of PHP)
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wr-form-generator
    • > POST request to /wp-admin/admin-ajax.php?action=get_custom_field_list
    • > Notice in wp-content/plugins/routee-contact-gathering/classes/class-rcg-ajax.php+270
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=wr-forms-list
    • > Warning in wp-content/plugins/routee-contact-gathering/classes/class-rcg-admin-listing.php+71
    Declaration of rcg_admin_listing::prepare_items($data) should be compatible with WP_List_Table::prepare_items()
    • > GET request to /wp-admin/admin.php?page=wr-forms-list
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Screenshots: Please a description for screenshot #2 in routee-contact-gathering/assets to your readme.txt
You can look at the official readme.txt

routee-contact-gathering/routee-contact-gathering.php Passed 13 tests

The main PHP file in "Routee Omnichannel Communication" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
99 characters long description:
Collect contact details from websites, based on Wordpress, and incorporate them in Routee platform.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected9,902 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript115597474,494
CSS7223943,077
PHP13391542,331

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity91.83
▷ Minimum class complexity14.00
▷ Maximum class complexity357.00
Average method complexity7.57
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods83
▷ Static methods56.02%
▷ Public methods7893.98%
▷ Protected methods00.00%
▷ Private methods56.02%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.24MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/multiple-select.png3.30KB0.62KB▼ 81.18%
lib/telbuild/img/flags@2x.png169.18KB65.55KB▼ 61.26%
images/openpopup.png0.16KB0.18KB0.00%
images/r-routee-logo.png0.53KB0.28KB▼ 48.45%
lib/telbuild/img/flags.png67.55KB23.95KB▼ 64.54%