84% pmpro-kissmetrics

Code Review | Paid Memberships Pro - Kissmetrics Add On

WordPress plugin Paid Memberships Pro - Kissmetrics Add On scored 84% from 54 tests.

About plugin

  • Plugin page: pmpro-kissmetrics
  • Plugin version: .3.1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.4.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2014
  • Latest release: Jul 20, 2017
  • Number of updates: 14
  • Update frequency: every 152.2 days
  • Top authors: strangerstudios (85.71%)jessica o (21.43%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 7,060 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.48ms] Passed 4 tests

A check of server-side resources used by Paid Memberships Pro - Kissmetrics Add On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.45 ▼2.97
Dashboard /wp-admin3.40 ▲0.0946.61 ▼11.86
Posts /wp-admin/edit.php3.51 ▲0.1547.96 ▼3.72
Add New Post /wp-admin/post-new.php5.98 ▲0.0989.97 ▼15.36
Media Library /wp-admin/upload.php3.32 ▲0.0941.61 ▲9.91
PMPro Kissmetrics /wp-admin/options-general.php?page=pmpro-kissmetrics3.3031.48

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Paid Memberships Pro - Kissmetrics Add On
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.184.66 ▲2.7242.63 ▲3.26
Dashboard /wp-admin2,213 ▲285.86 ▼0.0893.76 ▼13.5738.80 ▼6.86
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0337.04 ▼4.3531.60 ▼3.91
Add New Post /wp-admin/post-new.php1,545 ▲1218.42 ▼4.77629.52 ▲18.0055.42 ▲7.77
Media Library /wp-admin/upload.php1,392 ▲104.19 ▼0.0394.92 ▼1.4642.84 ▼0.34
PMPro Kissmetrics /wp-admin/options-general.php?page=pmpro-kissmetrics8752.0223.2527.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > At least one argument required. km.php <km_key> [<log_dir>]
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pmpro-kissmetrics/adminpages/settings.php:115
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/pmpro-kissmetrics/trunk/includes/lib/km.php on line 329
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pmpro-kissmetrics/pmpro-kissmetrics.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-kissmetrics/trunk/includes/init.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pmpro-kissmetrics/trunk/adminpages/settings.php:115
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/pmpro-kissmetrics/includes/lib/km.php on line 329
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/pmpro-kissmetrics/trunk/includes/lib/km.php on line 329
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-kissmetrics/includes/init.php:30
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/pmpro-kissmetrics/includes/lib/km.php on line 329

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

pmpro-kissmetrics/pmpro-kissmetrics.php 92% from 13 tests

"Paid Memberships Pro - Kissmetrics Add On" version .3.1...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of ".3.1...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected793 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5193151778
Bourne Shell10815

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods42100.00%
▷ Public methods1638.10%
▷ Protected methods2661.90%
▷ Private methods00.00%
Functions60
▷ Named functions60100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.25MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png23.93KB5.68KB▼ 76.28%
screenshot-3.png45.23KB9.03KB▼ 80.04%
screenshot-1.png56.41KB14.96KB▼ 73.47%
trunk/screenshot-2.png23.93KB5.68KB▼ 76.28%
trunk/screenshot-1.png56.41KB14.96KB▼ 73.47%