89% dropp-pay-per-use

Code Review | Dropp Pay Per Use

WordPress plugin Dropp Pay Per Use scored89%from 54 tests.

About plugin

  • Plugin page: dropp-pay-per-use
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2023
  • Latest release: Aug 29, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: droppapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /116 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.15ms] Passed 4 tests

Server-side resources used by Dropp Pay Per Use
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.07 ▼0.69
Dashboard /wp-admin3.36 ▲0.0650.57 ▼2.15
Posts /wp-admin/edit.php3.41 ▲0.0645.58 ▼8.14
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.30 ▼17.35
Media Library /wp-admin/upload.php3.28 ▲0.0634.96 ▼0.95
3. Set Pricing Plan /wp-admin/admin.php?page=dropp-cc-paywall-current-restrictions3.5039.58
Welcome & Quick Start /wp-admin/admin.php?page=dropp-cc-paywall3.3338.10
View Recent Purchases /wp-admin/admin.php?page=dropp-cc-paywall-subscriptions3.3438.75
1. Link Dropp Account /wp-admin/admin.php?page=dropp-cc-paywall-account3.3638.42
2. Create System pages /wp-admin/admin.php?page=dropp-cc-paywall-settings3.3840.66
View Logs /wp-admin/admin.php?page=dropp-cc-paywall-logs3.3137.26

Server storage [IO: ▲1.85MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 54 new files
Database: 4 new tables, 6 new options
New tables
wp_dropp_paywall_subscriptions
wp_dropp_paywall_plans
wp_dropp_paywall_restrictions
wp_dropp_paywall_logs
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Dropp Pay Per Use
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /5,492 ▲2,73516.86 ▲2.11575.90 ▲573.8340.14 ▼10.41
Dashboard /wp-admin2,246 ▲615.89 ▼0.0398.32 ▼6.9491.49 ▲52.89
Posts /wp-admin/edit.php2,132 ▲432.00 ▼0.0240.46 ▲5.4133.52 ▼4.99
Add New Post /wp-admin/post-new.php6,709 ▲5,19029.42 ▲6.33903.45 ▲262.7758.10 ▲1.36
Media Library /wp-admin/upload.php1,419 ▲344.24 ▲0.0696.78 ▲4.2770.19 ▲29.28
3. Set Pricing Plan /wp-admin/admin.php?page=dropp-cc-paywall-current-restrictions1,5364.5884.9268.98
Welcome & Quick Start /wp-admin/admin.php?page=dropp-cc-paywall1,2914.4783.5574.68
View Recent Purchases /wp-admin/admin.php?page=dropp-cc-paywall-subscriptions1,1964.4481.2069.76
1. Link Dropp Account /wp-admin/admin.php?page=dropp-cc-paywall-account1,3424.5283.1059.11
2. Create System pages /wp-admin/admin.php?page=dropp-cc-paywall-settings1,6084.4983.6373.59
View Logs /wp-admin/admin.php?page=dropp-cc-paywall-logs1,1874.4483.2252.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: pay-per-use, subscription, paywall, publication, micropayment

dropp-pay-per-use/dropp-pay-per-use.php 85% from 13 tests

"Dropp Pay Per Use" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/i18n/languages/" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin4,649 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP216275473,354
JavaScript414115661
CSS313313634

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity35.70
▷ Minimum class complexity4.00
▷ Maximum class complexity111.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods80
▷ Static methods2531.25%
▷ Public methods6176.25%
▷ Protected methods00.00%
▷ Private methods1923.75%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 1.49MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/list-page/icon-lock-secure.png104.93KB34.59KB▼ 67.04%
assets/images/settings-page/my-subscriptions-page-output.png271.99KB86.88KB▼ 68.06%
assets/banner-772x250.png87.37KB27.68KB▼ 68.32%
assets/icon-256x256.png9.00KB4.50KB▼ 50.04%
assets/images/dropp-icon.png1.12KB1.12KB0.00%