68% pmpro-infusionsoft

Code Review | Paid Memberships Pro - Infusionsoft Add On

WordPress plugin Paid Memberships Pro - Infusionsoft Add On scored68%from 54 tests.

About plugin

  • Plugin page: pmpro-infusionsoft
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 27, 2014
  • Latest release: Jun 1, 2020
  • Number of updates: 14
  • Update frequency: every 173.4 days
  • Top authors: strangerstudios (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /6,899 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.18MB] [CPU: ▼50.25ms] Passed 4 tests

A check of server-side resources used by Paid Memberships Pro - Infusionsoft Add On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.6615.50 ▼24.45
Dashboard /wp-admin2.84 ▼0.5117.86 ▼47.14
Posts /wp-admin/edit.php2.84 ▼0.5218.55 ▼37.23
Add New Post /wp-admin/post-new.php2.84 ▼3.0517.64 ▼92.16
Media Library /wp-admin/upload.php2.84 ▼0.3917.44 ▼18.25
PMPro Infusionsoft /wp-admin/options-general.php?page=pmprois_options2.8418.95

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Paid Memberships Pro - Infusionsoft Add On
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲11813.32 ▼0.991.86 ▼0.0442.43 ▼0.51
Dashboard /wp-admin2,227 ▲394.82 ▼0.07100.12 ▼8.3644.96 ▲3.89
Posts /wp-admin/edit.php2,113 ▲241.98 ▼0.0734.72 ▼6.4941.05 ▲5.41
Add New Post /wp-admin/post-new.php1,383 ▼13620.82 ▼2.43600.85 ▼60.5564.93 ▲11.69
Media Library /wp-admin/upload.php1,409 ▲214.28 ▲0.06100.60 ▼8.4646.82 ▼3.75
PMPro Infusionsoft /wp-admin/options-general.php?page=pmprois_options8641.8425.5734.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$pmpro_membership_levels
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pmprois_options
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$pmpro_membership_levels
    • > GET request to /wp-admin/options-general.php?page=pmprois_options
    • > Notice in wp-content/plugins/pmpro-infusionsoft/pmpro-infusionsoft.php+582
    Trying to access array offset on value of type bool

SRP 50% from 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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pmpro-infusionsoft/includes/conn.cfg.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-infusionsoft/pmpro-infusionsoft.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid version format
  • Screenshots: Screenshot #1 (Settings screen to add Infusionsoft Username/ID and API Key; Assign All Users Tags and per-Membership Level Tags.) image missing
You can look at the official readme.txt

pmpro-infusionsoft/pmpro-infusionsoft.php Passed 13 tests

"Paid Memberships Pro - Infusionsoft Add On" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
Sync your WordPress users and members with Infusionsoft contacts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin4,138 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45431,2894,134
JavaScript1003
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods119
▷ Static methods00.00%
▷ Public methods119100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin