88% infusionsoft-sdk

Code Review | Infusionsoft SDK

WordPress plugin Infusionsoft SDK scored 88% from 54 tests.

About plugin

  • Plugin page: infusionsoft-sdk
  • Plugin version: 1.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.2.1
  • WordPress version: 5.8.1
  • First release: Feb 3, 2014
  • Latest release: Jun 7, 2019
  • Number of updates: 23
  • Update frequency: every 84.9 days
  • Top authors: zulugrid (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active / 6,089 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.45MB] [CPU: ▼148.79ms] Passed 4 tests

Server-side resources used by Infusionsoft SDK
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.25 ▲0.5342.99 ▲21.00
Dashboard /wp-admin3.54 ▲0.4949.57 ▲0.91
Posts /wp-admin/edit.php3.59 ▲0.4750.41 ▼6.81
Add New Post /wp-admin/post-new.php5.84 ▲0.4098.53 ▼587.84
Media Library /wp-admin/upload.php3.42 ▲0.4232.59 ▼1.42
Infusionsoft SDK /wp-admin/options-general.php?page=infusionsoft-sdk/infusionsoft-sdk.php3.3938.32

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 196 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Infusionsoft SDK: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲10315.75 ▲0.088.39 ▼2.9754.71 ▲2.31
Dashboard /wp-admin2,983 ▲525.93 ▼0.07149.81 ▼14.71123.61 ▲6.32
Posts /wp-admin/edit.php2,752 ▲132.71 ▼0.0267.47 ▲4.5495.80 ▼6.37
Add New Post /wp-admin/post-new.php1,692 ▲918.76 ▲0.50403.09 ▲6.49119.84 ▲1.15
Media Library /wp-admin/upload.php1,820 ▲135.03 ▲0.00162.74 ▼9.66130.79 ▼5.00
Infusionsoft SDK /wp-admin/options-general.php?page=infusionsoft-sdk/infusionsoft-sdk.php1,0702.1661.8080.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/infusionsoft-sdk/Infusionsoft/index.php
    • > /wp-content/plugins/infusionsoft-sdk/Infusionsoft/admin/generate_broken_field_files.php
    • > /wp-content/plugins/infusionsoft-sdk/Infusionsoft/admin/generate_classes_from_API_Field_access_file.php
  • 392× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      fwrite() expects parameter 1 to be resource, bool given in wp-content/plugins/infusionsoft-sdk/Infusionsoft/admin/generate_classes_from_API_Field_access_file.php on line 46
    • > PHP Fatal error
      Uncaught Error: Class 'Infusionsoft_Generated_Base' not found in wp-content/plugins/infusionsoft-sdk/Infusionsoft/Generated/CreditCard.php:40
    • > PHP Warning
      include(): Failed opening 'wp-content/plugins/infusionsoft-sdk/Infusionsoft/generated/a_template_base_class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/infusionsoft-sdk/Infusionsoft/admin/generate_classes_from_API_Field_access_file.php on line 43
    • > PHP Fatal error
      Uncaught Error: Class 'Infusionsoft_Generated_Contact' not found in wp-content/plugins/infusionsoft-sdk/Infusionsoft/Contact.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Infusionsoft_Generated_Base' not found in wp-content/plugins/infusionsoft-sdk/Infusionsoft/Generated/DataFormField.php:13
    • > PHP Warning
      fopen(wp-content/plugins/infusionsoft-sdk/Infusionsoft/generated/Campaign.php): failed to open stream: No such file or directory in wp-content/plugins/infusionsoft-sdk/Infusionsoft/admin/generate_classes_from_API_Field_access_file.php on line 45
    • > PHP Warning
      fclose() expects parameter 1 to be resource, bool given in wp-content/plugins/infusionsoft-sdk/Infusionsoft/admin/generate_classes_from_API_Field_access_file.php on line 47
    • > PHP Fatal error
      Uncaught Error: Class 'Infusionsoft_Generated_Base' not found in wp-content/plugins/infusionsoft-sdk/Infusionsoft/Generated/Affiliate.php:20
    • > PHP Warning
      fclose() expects parameter 1 to be resource, bool given in wp-content/plugins/infusionsoft-sdk/Infusionsoft/admin/generate_classes_from_API_Field_access_file.php on line 47
    • > PHP Fatal error
      Uncaught Error: Class 'Infusionsoft_Generated_Base' not found in wp-content/plugins/infusionsoft-sdk/Infusionsoft/Generated/PayPlanItem.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: api, sdk, infusionsoft

infusionsoft-sdk/infusionsoft-sdk.php 92% from 13 tests

"Infusionsoft SDK" version 1.0.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 247 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,667 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1841,1601,3405,336
Pascal12022,2591,379
XML1120218952

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.15
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes176
▷ Abstract classes00.00%
▷ Concrete classes176100.00%
▷ Final classes00.00%
Methods636
▷ Static methods19330.35%
▷ Public methods62998.90%
▷ Protected methods60.94%
▷ Private methods10.16%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin