68% zlick-paywall

Code Review | Zlick Paywall

WordPress plugin Zlick Paywall scored68%from 54 tests.

About plugin

  • Plugin page: zlick-paywall
  • Plugin version: 3.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2021
  • Latest release: May 22, 2023
  • Number of updates: 73
  • Update frequency: every 10.8 days
  • Top authors: aimansaeedsh (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /3,429 total downloads

Benchmarks

Plugin footprint 65% 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: ▼5.74ms] Passed 4 tests

Analyzing server-side resources used by Zlick Paywall
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1843.12 ▼1.41
Dashboard /wp-admin3.53 ▲0.2353.01 ▼4.21
Posts /wp-admin/edit.php3.62 ▲0.2751.03 ▲3.87
Add New Post /wp-admin/post-new.php5.64 ▼0.2583.74 ▼20.66
Media Library /wp-admin/upload.php3.43 ▲0.2040.06 ▲3.31
Zlick Payments /wp-admin/options-general.php?page=zlick-payments-plugin3.4035.94

Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • You have illegally modified 1 file (8.90KB) outside of "wp-content/plugins/zlick-paywall/" and "wp-content/uploads/"
    • (new file) .well-known/apple-developer-merchantid-domain-association
Filesystem: 28 new files
Database: 2 new tables, 6 new options
New tables
wp_zlick_subscription
wp_zlick_articles
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Zlick Paywall
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.11 ▼0.111.73 ▼0.1143.97 ▼1.46
Dashboard /wp-admin2,204 ▲275.61 ▲0.1091.61 ▲1.4937.80 ▼10.85
Posts /wp-admin/edit.php2,137 ▲371.99 ▲0.0034.42 ▼5.3635.89 ▼5.39
Add New Post /wp-admin/post-new.php6,248 ▲4,72218.61 ▼5.12841.59 ▲144.5460.15 ▼1.07
Media Library /wp-admin/upload.php1,406 ▲34.13 ▲0.0093.62 ▼14.4243.47 ▼2.30
Zlick Payments /wp-admin/options-general.php?page=zlick-payments-plugin8542.1222.9326.56

Uninstaller [IO: ▲0.01MB] [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
  • Zombie tables were found after uninstall: 2 tables
    • wp_zlick_articles
    • wp_zlick_subscription
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/zlick-paywall/tests/bootstrap.php
    • > /wp-content/plugins/zlick-paywall/public/templates/zlick-widget.php
    • > /wp-content/plugins/zlick-paywall/zlick-payments.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/zlick-paywall/tests/test-sample.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/zlick-paywall/admin/class-zlick-payments-admin.php:372
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/zlick-paywall/public/shortcodes/zlick-widget.php:79

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 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: pay-per-post, monetization, paywall, content-monetization, stripe...

zlick-paywall/zlick-payments.php 85% from 13 tests

The main PHP file in "Zlick Paywall" ver. 3.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("zlick-paywall.php" instead of "zlick-payments.php")
  • Description: The description should be shorter than 140 characters (currently 145 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 plugin1,457 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP152473751,101
JavaScript3203186
Bourne Shell12111123
PO File11017
JSON11016
CSS21114

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.38
Average class complexity13.25
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods26
▷ Static methods311.54%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin