10% inbound-rocket

Code Review | Visitor Analytics and Lead Generation Plugin by Inbound Rocket

WordPress plugin Visitor Analytics and Lead Generation Plugin by Inbound Rocket scored 10% from 54 tests.

About plugin

  • Plugin page: inbound-rocket
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 23, 2015
  • Latest release: Dec 5, 2018
  • Number of updates: 76
  • Update frequency: every 16.4 days
  • Top authors: inboundrocket (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

20+ active / 8,259 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
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/inbound-rocket/inbound-rocket.php+74
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.22ms] Passed 4 tests

Server-side resources used by Visitor Analytics and Lead Generation Plugin by Inbound Rocket
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.22 ▼35.67
Dashboard /wp-admin2.05 ▼1.265.14 ▼43.64
Posts /wp-admin/edit.php2.05 ▼1.316.15 ▼43.16
Add New Post /wp-admin/post-new.php2.05 ▼3.845.93 ▼90.40
Media Library /wp-admin/upload.php2.05 ▼1.188.28 ▼23.87

Server storage [IO: ▲3.18MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 237 new files
Database: 7 new tables, 6 new options
New tables
wp_ir_submissions
wp_ir_shares
wp_ir_pageviews
wp_ir_emails
wp_ir_tags
wp_ir_tag_relationships
wp_ir_leads
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Visitor Analytics and Lead Generation Plugin by Inbound Rocket
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,112 ▲37713.82 ▼0.5715.20 ▲13.4445.86 ▼9.09
Dashboard /wp-admin2,403 ▲2125.91 ▲1.00112.33 ▲13.1478.49 ▲33.44
Posts /wp-admin/edit.php2,305 ▲2162.01 ▲0.0140.20 ▲5.8833.42 ▼1.80
Add New Post /wp-admin/post-new.php1,764 ▲23122.71 ▼0.63732.42 ▲63.9957.21 ▲1.89
Media Library /wp-admin/upload.php1,598 ▲2134.26 ▲0.09101.07 ▼2.9076.49 ▲31.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/inbound-rocket/inbound-rocket.php+74
    Function create_function() is deprecated
  • Zombie tables were found after uninstall: 7 tables
    • wp_ir_tags
    • wp_ir_shares
    • wp_ir_leads
    • wp_ir_emails
    • wp_ir_tag_relationships
    • wp_ir_pageviews
    • wp_ir_submissions
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 32× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/welcome-mat/admin/welcome-mat-list-table.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/welcome-mat/admin/metaboxes/welcome-mat-fields-view.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/aweber-connector/admin/aweber-connector-admin.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/scroll-boxes/admin/metaboxes/scroll-box-appearance-view.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/scroll-boxes/admin/scroll-boxes-admin-functions.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/mailchimp-connector.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/scroll-boxes/admin/metaboxes/scroll-box-option-view.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/scroll-boxes/scroll-box-class.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/people-search/admin/people-search-admin.php
    • > /wp-content/plugins/inbound-rocket/inc/power-ups/mailchimp-connector/admin/mailchimp-connector-admin.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'AWeberResponse' not found in wp-content/plugins/inbound-rocket/inc/power-ups/aweber-connector/inc/aweber_api/aweber_collection.php:2
    • > PHP Fatal error
      Cannot declare class InvalidArgumentException, because the name is already in use in wp-content/plugins/inbound-rocket/admin/lib/Snowplow/RefererParser/Exception/InvalidArgumentException.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'AWeberOAuthAdapter' not found in wp-content/plugins/inbound-rocket/inc/power-ups/aweber-connector/inc/aweber_api/oauth_application.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'AWeberResponse' not found in wp-content/plugins/inbound-rocket/inc/power-ups/aweber-connector/inc/aweber_api/aweber_entry.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ConfigReaderInterface' not found in wp-content/plugins/inbound-rocket/admin/lib/Snowplow/RefererParser/Config/JsonConfigReader.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AWeberAPIBase' not found in wp-content/plugins/inbound-rocket/inc/power-ups/aweber-connector/inc/aweber_api/aweber_response.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 45 tag instead of maximum 10
You can take inspiration from this readme.txt

inbound-rocket/inbound-rocket.php 92% from 13 tests

"Visitor Analytics and Lead Generation Plugin by Inbound Rocket" version 1.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 404 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin40,505 lines of code in 143 files:
LanguageFilesBlank linesComment linesLines of code
PHP813,4354,97819,097
JavaScript291,8359547,698
PO File42,3603,1525,365
JSON1004,064
CSS18245473,589
SVG897378
HTML25917314

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 112)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.66
▷ Minimum class complexity1.00
▷ Maximum class complexity290.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity112.00
Code structure
Namespaces1
Interfaces3
Traits0
Classes83
▷ Abstract classes22.41%
▷ Concrete classes8197.59%
▷ Final classes11.23%
Methods690
▷ Static methods426.09%
▷ Public methods62891.01%
▷ Protected methods324.64%
▷ Private methods304.35%
Functions85
▷ Named functions85100.00%
▷ Anonymous functions00.00%
Constants84
▷ Global constants7892.86%
▷ Class constants67.14%
▷ 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
57 compressed PNG files occupy 0.21MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/email-header.png8.41KB8.91KB0.00%
inc/power-ups/selection-sharer/img/shared-facebook.png0.19KB0.21KB0.00%
img/power-ups/power-up-icon-scroll-boxes.png3.35KB3.52KB0.00%
img/power-ups/power-up-icon-welcome-bar@2x.png5.91KB6.17KB0.00%
inc/power-ups/welcome-bar/img/lightgrey.png0.99KB1.57KB0.00%