62% wp-interakt-integration

Code Review | Interakt

WordPress plugin Interakt scored62%from 54 tests.

About plugin

  • Plugin page: wp-interakt-integ...
  • Plugin version: 2.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 8, 2014
  • Latest release: Mar 31, 2017
  • Number of updates: 89
  • Update frequency: every 13.9 days
  • Top authors: peeyush_singla (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /3,131 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.01MB] [CPU: ▼45.23ms] Passed 4 tests

An overview of server-side resources used by Interakt
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.5116.28 ▼26.43
Dashboard /wp-admin3.00 ▼0.3120.80 ▼32.89
Posts /wp-admin/edit.php3.00 ▼0.3620.97 ▼31.24
Add New Post /wp-admin/post-new.php3.00 ▼2.8917.96 ▼90.37
Media Library /wp-admin/upload.php3.00 ▼0.2321.38 ▼16.98
Setup /wp-admin/admin.php?page=interakt_plugin3.0018.86
Contact Form /wp-admin/admin.php?page=interakt_plugin_cf3.0019.58

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 11 new options
New WordPress options
interakt_contactform_msgs_options
interakt_manageapps_options
interakt_mail_options
widget_recent-posts
widget_interaktsubscribe_widget
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
interakt_contactform_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Interakt
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20313.53 ▼1.199.18 ▲7.0543.50 ▼0.51
Dashboard /wp-admin2,258 ▲815.79 ▲0.2087.91 ▼3.4461.69 ▲18.64
Posts /wp-admin/edit.php2,166 ▲632.27 ▲0.2442.19 ▼3.2136.54 ▼0.84
Add New Post /wp-admin/post-new.php1,737 ▲20920.44 ▼2.81665.27 ▼37.5730.81 ▼20.91
Media Library /wp-admin/upload.php1,460 ▲604.47 ▲0.27120.00 ▲7.3248.41 ▼0.15
Setup /wp-admin/admin.php?page=interakt_plugin1,2892.2232.1128.88
Contact Form /wp-admin/admin.php?page=interakt_plugin_cf1,2682.1028.4246.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-interakt-integration/interakt_for_wordpress.php+307
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_recent-posts
    • interakt_contactform_msgs_options
    • widget_recent-comments
    • interakt_mail_options
    • db_upgraded
    • interakt_manageapps_options
    • can_compress_scripts
    • widget_interaktsubscribe_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=interakt_plugin_cf
    • > Notice in wp-content/plugins/wp-interakt-integration/interakt_for_wordpress.php+307
    Trying to access array offset on value of type bool
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=interakt_plugin_cf
    • > Notice in wp-content/plugins/wp-interakt-integration/interakt_for_wordpress.php+324
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=interakt_plugin
    • > Notice in wp-content/plugins/wp-interakt-integration/interakt_for_wordpress.php+286
    Undefined variable: setup_screen_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=interakt_plugin_cf
    • > Notice in wp-content/plugins/wp-interakt-integration/interakt_for_wordpress.php+298
    Undefined variable: contact_screen_id
    • > GET request to /wp-admin/admin.php?page=interakt_plugin_cf
    • > Warning in wp-content/plugins/wp-interakt-integration/class/class_ps_Interakt.php+574
    Illegal string offset 'interakt_cf_recepient_email'
    • > GET request to /wp-admin/admin.php?page=interakt_plugin_cf
    • > Warning in wp-content/plugins/wp-interakt-integration/class/class_ps_Interakt.php+585
    Illegal string offset 'interakt_cf_subject'
    • > GET request to /wp-admin/admin.php?page=interakt_plugin_cf
    • > Warning in wp-content/plugins/wp-interakt-integration/class/class_ps_Interakt.php+594
    Illegal string offset 'interakt_cf_mail_body'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=interakt_plugin_cf
    • > Warning in wp-content/plugins/wp-interakt-integration/class/class_ps_Interakt.php+522
    Illegal string offset 'interakt_cf_success_msg'

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 fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-interakt-integration/class/class_send_email_to_interakt.php
    • > /wp-content/plugins/wp-interakt-integration/class/class_interakt_contact_form.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-interakt-integration/class/class_interakt_menu_metabox.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_order_types() in wp-content/plugins/wp-interakt-integration/class/class_syncing_order_data.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-interakt-integration/class/class_interakt_subscribe_widget.php:2
    • > PHP Warning
      require_once(wp-content/plugins/wp-interakt-integration/class/admin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-interakt-integration/class/nav-menuscopy.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-interakt-integration/class/class_interakt_subscribe_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-interakt-integration/class/templatecopy.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-interakt-integration/class/class_create_dynamic_fields.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-interakt-integration/class/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-interakt-integration/class/nav-menuscopy.php on line 13

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: lead-capture, feedback form, users, feedback, email...

wp-interakt-integration/interakt_for_wordpress.php 92% from 13 tests

The primary PHP file in "Interakt" version 2.8.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 ("wp-interakt-integration.php" instead of "interakt_for_wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin4,420 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP134943362,271
JavaScript10314321,209
CSS54853940

PHP code Passed 2 tests

Analyzing 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.28
Average class complexity9.90
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods60100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1789.47%
▷ Anonymous functions210.53%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/redcrossmark.png2.25KB2.25KB0.04%
images/tick.png1.21KB1.07KB▼ 11.45%
images/interakt_logo.png3.10KB0.66KB▼ 78.80%