78% wallkit

Code Review | Wallkit Subscriptions & Paywall Plugin for Wordpress

WordPress plugin Wallkit Subscriptions & Paywall Plugin for Wordpress scored78%from 54 tests.

About plugin

  • Plugin page: wallkit
  • Plugin version: 3.2.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Apr 22, 2019
  • Latest release: Nov 3, 2023
  • Number of updates: 68
  • Update frequency: every 24.4 days
  • Top authors: wallkit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,093 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.50MB] [CPU: ▼0.62ms] Passed 4 tests

A check of server-side resources used by Wallkit Subscriptions & Paywall Plugin for Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5246.25 ▲7.00
Dashboard /wp-admin3.81 ▲0.4650.33 ▼17.29
Posts /wp-admin/edit.php3.86 ▲0.5056.67 ▲9.67
Add New Post /wp-admin/post-new.php6.41 ▲0.5296.69 ▲3.88
Media Library /wp-admin/upload.php3.73 ▲0.5038.58 ▲3.93
Settings /wp-admin/admin.php?page=wallkit-settings3.7836.27
Advanced /wp-admin/admin.php?page=wallkit-advanced3.7641.48
Wallkit /wp-admin/admin.php?page=wallkit/admin/class-wallkit-wp-admin.php3.7033.52
Appearance /wp-admin/admin.php?page=wallkit-Appearance3.7740.57

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Wallkit Subscriptions & Paywall Plugin for Wordpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8314.25 ▼0.061.65 ▼0.0144.34 ▲2.37
Dashboard /wp-admin2,220 ▲405.70 ▲0.05102.73 ▲1.8093.57 ▲51.69
Posts /wp-admin/edit.php2,143 ▲432.08 ▲0.0540.15 ▲1.9035.10 ▲0.48
Add New Post /wp-admin/post-new.php1,569 ▲3325.03 ▲1.95724.30 ▲45.7490.60 ▲33.59
Media Library /wp-admin/upload.php1,437 ▲374.14 ▼0.04106.02 ▼3.1972.59 ▲25.49
Settings /wp-admin/admin.php?page=wallkit-settings1,1621.9027.1928.15
Advanced /wp-admin/admin.php?page=wallkit-advanced1,5856.78136.88115.15
Wallkit /wp-admin/admin.php?page=wallkit/admin/class-wallkit-wp-admin.php8401.7024.8529.47
Appearance /wp-admin/admin.php?page=wallkit-Appearance3,73711.18241.67111.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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)
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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wallkit/admin/partials/template-wallkit-admin-main.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WallkitSDK\\Exceptions\\WallkitException' not found in wp-content/plugins/wallkit/vendor/wallkit-php-sdk/src/Exceptions/WallkitConnectionException.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wallkit/admin/partials/template-wallkit-admin-configuration.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wallkit/admin/partials/template-wallkit-admin-advanced.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Wallkit_Wp_Settings' not found in wp-content/plugins/wallkit/includes/class-wallkit-wp-activator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WallkitSDK\\Exceptions\\WallkitException' not found in wp-content/plugins/wallkit/vendor/wallkit-php-sdk/src/Exceptions/WallkitApiException.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wallkit/admin/partials/template-wallkit-admin-setup.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wallkit/admin/partials/settings/template-integration-settings.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WallkitSDK\\Exceptions\\WallkitException' not found in wp-content/plugins/wallkit/vendor/wallkit-php-sdk/src/Exceptions/WallkitAccessException.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wallkit/admin/partials/settings/template-settings.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wallkit/admin/partials/settings/template-dev-settings.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

wallkit/wallkit-wp.php 92% from 13 tests

The principal PHP file in "Wallkit Subscriptions & Paywall Plugin for Wordpress" v. 3.2.8 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wallkit.php" instead of "wallkit-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,047 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP469151,5243,341
JavaScript411270620
PO File3213084
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.09
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods205
▷ Static methods104.88%
▷ Public methods17685.85%
▷ Protected methods20.98%
▷ Private methods2713.17%
Functions16
▷ Named functions425.00%
▷ Anonymous functions1275.00%
Constants16
▷ Global constants743.75%
▷ Class constants956.25%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.60MB with 0.42MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/main_wallkit_image.png574.27KB161.20KB▼ 71.93%
admin/images/main_background_old.png22.52KB2.19KB▼ 90.28%
admin/images/main_background.png11.31KB5.79KB▼ 48.76%
admin/images/WK-Icon.png1.90KB0.51KB▼ 73.37%