62% infusionsoft-official-opt-in-forms

Code Review | Keap Official Opt-in Forms

WordPress plugin Keap Official Opt-in Forms scored62%from 54 tests.

About plugin

  • Plugin page: infusionsoft-offi...
  • Plugin version: 1.0.11
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: May 24, 2023
  • Number of updates: 42
  • Update frequency: every 53.0 days
  • Top authors: Infusionsoft (95.24%)michael.fairchild (7.14%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /43,797 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.30MB] [CPU: ▲2.40ms] Passed 4 tests

An overview of server-side resources used by Keap Official Opt-in Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.86 ▲1.4047.09 ▲9.36
Dashboard /wp-admin4.63 ▲1.2855.53 ▼4.11
Posts /wp-admin/edit.php4.68 ▲1.3250.58 ▲5.91
Add New Post /wp-admin/post-new.php7.16 ▲1.2798.63 ▼1.58
Media Library /wp-admin/upload.php4.56 ▲1.3247.68 ▲11.92
Opt-in Forms /wp-admin/admin.php?page=inf_infusionsoft_options4.6844.79

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 428 new files
Database: 1 new table, 9 new options
New tables
wp_inf_infusionsoft_stats
New WordPress options
inf_infusionsoft_stats_cache
can_compress_scripts
widget_infusionsoft
db_upgraded
widget_recent-comments
inf_infusionsoft_options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Keap Official Opt-in Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲27813.95 ▼0.4215.27 ▲13.5341.40 ▲1.66
Dashboard /wp-admin2,247 ▲565.84 ▲0.9798.96 ▼3.1536.86 ▼7.72
Posts /wp-admin/edit.php2,130 ▲412.04 ▲0.0133.67 ▼4.2233.58 ▼1.51
Add New Post /wp-admin/post-new.php1,564 ▲3118.25 ▼4.98625.19 ▼58.1961.44 ▲5.38
Media Library /wp-admin/upload.php1,429 ▲414.16 ▲0.0295.67 ▼15.0740.30 ▼5.22
Settings /wp-admin/admin.php?page=inf_infusionsoft_options#tab_inf_dashboard_tab_content_header_accounts4,2346.46127.3680.56
Import & Export /wp-admin/admin.php?page=inf_infusionsoft_options#tab_inf_dashboard_tab_content_header_importexport4,2366.45124.8041.60
Opt-in Forms /wp-admin/admin.php?page=inf_infusionsoft_options4,2266.34126.0137.41
Statistics /wp-admin/admin.php?page=inf_infusionsoft_options#tab_inf_dashboard_tab_content_header_stats4,3116.48114.9538.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_inf_infusionsoft_stats
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • inf_infusionsoft_stats_cache
    • inf_infusionsoft_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_infusionsoft
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/test/verify_compat.php
    • > /wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/debugger/controller.php
    • > /wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/client/client.php
    • > /wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/debugger/action.php
    • > /wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/debugger/index.php
    • > /wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/client/mail.php
  • 75× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'xmlrpc.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/server/proxy.php on line 12
    • > PHP Warning
      include(xmlrpc_wrappers.inc): failed to open stream: No such file or directory in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/server/server.php on line 22
    • > PHP Warning
      include(xmlrpcs.inc): failed to open stream: No such file or directory in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/server/server.php on line 21
    • > PHP Warning
      include(xmlrpc.inc): failed to open stream: No such file or directory in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/client/client.php on line 8
    • > PHP Warning
      include(): Failed opening 'xmlrpc.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/client/introspect.php on line 15
    • > PHP Warning
      include(): Failed opening 'xmlrpc.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/client/mail.php on line 17
    • > PHP Warning
      require_once(INF_INFUSIONSOFT_PLUGIN_DIRinfusionsoft.php): failed to open stream: No such file or directory in wp-content/plugins/infusionsoft-official-opt-in-forms/includes/classes/integrations/class.infusionsoft-redirect.php on line 3
    • > PHP Warning
      include(): Failed opening 'xmlrpcs.inc' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/server/server.php on line 21
    • > PHP Fatal error
      require_once(): Failed opening required 'INF_INFUSIONSOFT_PLUGIN_DIRinfusionsoft.php' (include_path='.:/usr/share/php') in wp-content/plugins/infusionsoft-official-opt-in-forms/includes/classes/integrations/class.infusionsoft-redirect.php on line 3
    • > PHP Warning
      include(xmlrpc.inc): failed to open stream: No such file or directory in wp-content/plugins/infusionsoft-official-opt-in-forms/subscription/infusionsoft/xmlrpc/demo/server/server.php on line 20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=inf_infusionsoft_options#tab_inf_dashboard_tab_content_header_stats
    • > Javascript (severe) in unknown
    /wp-content/plugins/infusionsoft-official-opt-in-forms/js/googlechart.js?ver=1.0.11 3:4 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
The official readme.txt might help

infusionsoft-official-opt-in-forms/infusionsoft.php 85% from 13 tests

"Keap Official Opt-in Forms" version 1.0.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("infusionsoft-official-opt-in-forms.php" instead of "infusionsoft.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected50,464 lines of code in 335 files:
LanguageFilesBlank linesComment linesLines of code
PHP492,7145,30319,522
SVG16330315718,746
XML1914203,362
JavaScript535181373,008
CSS124491392,700
PO File27007841,516
HTML50001,436
make24443116
Perl116531
Python110225
Markdown1102

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 189)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity74.17
▷ Minimum class complexity1.00
▷ Maximum class complexity847.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity189.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods461
▷ Static methods204.34%
▷ Public methods45598.70%
▷ Protected methods30.65%
▷ Private methods30.65%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
31 PNG files occupy 0.28MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/premade-image-16.png21.72KB8.32KB▼ 61.69%
images/required.png1.11KB0.19KB▼ 82.88%
images/premade-image-12.png23.47KB8.48KB▼ 63.86%
images/logo.png1.78KB0.77KB▼ 56.81%
images/premade-image-11.png5.30KB2.57KB▼ 51.59%