58% inplayer-paywall

Code Review | InPlayer Paywall

WordPress plugin InPlayer Paywall scored 58% from 54 tests.

About plugin

  • Plugin page: inplayer-paywall
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2016
  • Latest release: Feb 6, 2018
  • Number of updates: 28
  • Update frequency: every 17.8 days
  • Top authors: inplayerwordpress (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 2,934 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.33ms] Passed 4 tests

A check of server-side resources used by InPlayer Paywall
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.04 ▼1.70
Dashboard /wp-admin3.40 ▲0.1043.52 ▼6.22
Posts /wp-admin/edit.php3.48 ▲0.1246.30 ▼0.04
Add New Post /wp-admin/post-new.php6.16 ▲0.2779.93 ▼15.85
Media Library /wp-admin/upload.php3.38 ▲0.1633.41 ▼1.54
Activate Account /wp-admin/admin.php?page=inplayer-activate3.3331.18
Login /wp-admin/admin.php?page=inplayer-login3.3032.39
InPlayer PayWall /wp-admin/admin.php?page=inplayer-home3.3331.65
Terms & Conditions /wp-admin/admin.php?page=inplayer-terms3.3333.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 65 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

This is an overview of browser requirements for InPlayer Paywall
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,652 ▼1,08310.26 ▼2.992.02 ▼2.7343.18 ▼5.11
Dashboard /wp-admin1,020 ▼1,1712.13 ▼2.7337.81 ▼65.9432.33 ▼10.93
Posts /wp-admin/edit.php2,126 ▲372.05 ▲0.0536.60 ▼6.1234.85 ▼0.06
Add New Post /wp-admin/post-new.php1,549 ▲623.54 ▲0.51688.84 ▲43.3637.08 ▼16.82
Media Library /wp-admin/upload.php1,422 ▲344.23 ▲0.0797.21 ▲0.6240.94 ▼1.18
Activate Account /wp-admin/admin.php?page=inplayer-activate8382.0726.0829.03
Login /wp-admin/admin.php?page=inplayer-login1,0232.0823.9531.39
InPlayer PayWall /wp-admin/admin.php?page=inplayer-home7972.0324.9423.74
Terms & Conditions /wp-admin/admin.php?page=inplayer-terms7942.0624.5425.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Error in wp-content/plugins/inplayer-paywall/includes/InPlayerPlugin.php+3
    Cannot declare class InPlayerPlugin, because the name is already in use
  • The plugin did not uninstall correctly, leaving 65 files (0.21MB) in the plugin directory
    • (new file) assets/css/inplayer-admin.css
    • (new file) assets/fonts/icoplayer.woff
    • (new file) assets/img/inplayer-paypal.png
    • (new file) assets/img/inplayer-logo.png
    • (new file) assets/fonts/icoplayer.eot
    • (new file) assets/fonts/icoplayer.svg
    • (new file) assets/img/.directory
    • (new file) assets/img/asset-video.svg
    • (new file) assets/fonts/icoplayer.ttf
    • (new file) assets/img/asset-html.svg
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-posts

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
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/inplayer-paywall/views/text-editor-shortcode.php
    • > /wp-content/plugins/inplayer-paywall/views/payments/active-method.php
    • > /wp-content/plugins/inplayer-paywall/views/options/countries.php
  • 42× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/inplayer-paywall/includes/InPlayerPlugin.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/inplayer-paywall/views/inplayer-injector.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/inplayer-paywall/views/settings-index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inplayer-paywall/views/payments/widget-purchases.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/inplayer-paywall/views/payments/widget-balance.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/inplayer-paywall/views/payments/widget-transactions.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/inplayer-paywall/includes/AssetsListTable.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/inplayer-paywall/views/form-options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/inplayer-paywall/views/item/create-asset.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/inplayer-paywall/views/form-activate.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
Please fix the following attributes:
  • Tags: You are using too many tags: 27 tag instead of maximum 10
You can take inspiration from this readme.txt

inplayer-paywall/functions.php 92% from 13 tests

"InPlayer Paywall" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("inplayer-paywall.php" instead of "functions.php")

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
Success! There were no dangerous files found in this plugin4,125 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP493523762,348
JavaScript21721031,028
PO File1167215415
CSS1346286
SVG30048

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity22.00
▷ Minimum class complexity5.00
▷ Maximum class complexity68.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes583.33%
Methods84
▷ Static methods33.57%
▷ Public methods5464.29%
▷ Protected methods2327.38%
▷ Private methods78.33%
Functions26
▷ Named functions00.00%
▷ Anonymous functions26100.00%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/inplayer-paypal.png4.38KB2.98KB▼ 32.05%
assets/img/inplayer-logo.png6.52KB3.23KB▼ 50.47%
assets/img/inplayer-small-logo.png0.48KB0.57KB0.00%