10% nodeless-paywall

Code Review | Nodeless Paywall

WordPress plugin Nodeless Paywall scored10%from 54 tests.

About plugin

  • Plugin page: nodeless-paywall
  • Plugin version: 1.0.6
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2023
  • Latest release: May 4, 2023
  • Number of updates: 5
  • Update frequency: every 8.2 days
  • Top authors: nodeless (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /379 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > User error in wp-content/plugins/nodeless-paywall/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16.

Server metrics [RAM: ▼1.82MB] [CPU: ▼59.57ms] Passed 4 tests

This is a short check of server-side resources used by Nodeless Paywall
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.05 ▼37.32
Dashboard /wp-admin2.19 ▼1.156.99 ▼58.43
Posts /wp-admin/edit.php2.19 ▼1.167.00 ▼45.24
Add New Post /wp-admin/post-new.php2.19 ▼3.696.56 ▼97.29
Media Library /wp-admin/upload.php2.19 ▼1.048.22 ▼30.07

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 624 new files
Database: 1 new table, no new options
New tables
wp_nodeless_paywall_payments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nodeless Paywall
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲6114.41 ▼0.262.22 ▲0.2346.33 ▲1.44
Dashboard /wp-admin2,241 ▲615.63 ▼0.0589.33 ▼2.2782.50 ▲38.01
Posts /wp-admin/edit.php2,147 ▲472.01 ▲0.0239.88 ▲3.3037.12 ▲1.48
Add New Post /wp-admin/post-new.php1,697 ▲17122.99 ▲5.51661.04 ▼20.3639.96 ▼21.01
Media Library /wp-admin/upload.php1,450 ▲504.24 ▲0.08108.70 ▼10.2246.10 ▼1.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User error in wp-content/plugins/nodeless-paywall/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 298× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'BitWasp\\Bitcoin\\Script\\Consensus\\ConsensusInterface' not found in wp-content/plugins/nodeless-paywall/vendor/protonlabs/bitcoin/src/Script/Consensus/BitcoinConsensus.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Semver\\Constraint\\ConstraintInterface' not found in wp-content/plugins/nodeless-paywall/vendor/composer/semver/src/Constraint/MultiConstraint.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\\Serializable' not found in wp-content/plugins/nodeless-paywall/vendor/protonlabs/bitcoin/src/Transaction/TransactionInput.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\Universal\\Integer' not found in wp-content/plugins/nodeless-paywall/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Enumerated.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'BitWasp\\Bitcoin\\Crypto\\EcAdapter\\Serializer\\Key\\PrivateKeySerializerInterface' not found in wp-content/plugins/nodeless-paywall/vendor/protonlabs/bitcoin/src/Crypto/EcAdapter/Impl/PhpEcc/Serializer/Key/PrivateKeySerializer.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Mdanter\\Ecc\\Math\\GmpMathInterface' not found in wp-content/plugins/nodeless-paywall/vendor/mdanter/ecc/src/Math/GmpMath.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/nodeless-paywall/vendor/fgrosse/phpasn1/lib/ASN1/Construct.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/nodeless-paywall/vendor/fgrosse/phpasn1/lib/ASN1/AbstractString.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Buffertools\\Types\\AbstractUint' not found in wp-content/plugins/nodeless-paywall/vendor/bitwasp/buffertools/src/Buffertools/Types/Uint32.php:9
    • > PHP Fatal error
      Trait 'Jorijn\\Bitcoin\\Bolt11\ormalizer\\DenormalizerTrait' not found in wp-content/plugins/nodeless-paywall/vendor/jorijn/bitcoin-bolt11/src/Normalizer/FallbackAddressDenormalizer.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

nodeless-paywall/nodeless-paywall.php 85% from 13 tests

"Nodeless Paywall" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin33,177 lines of code in 600 files:
LanguageFilesBlank linesComment linesLines of code
PHP5687,70715,67830,773
JavaScript65266812
JSON200794
Markdown71260349
CSS4277160
YAML4153128
XML20045
Bourne Shell58044
make114041
Ant15031

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 204)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.65
▷ Minimum class complexity1.00
▷ Maximum class complexity266.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity204.00
Code structure
Namespaces122
Interfaces71
Traits1
Classes462
▷ Abstract classes296.28%
▷ Concrete classes43393.72%
▷ Final classes00.00%
Methods2,767
▷ Static methods29410.63%
▷ Public methods2,49890.28%
▷ Protected methods1304.70%
▷ Private methods1395.02%
Functions57
▷ Named functions1831.58%
▷ Anonymous functions3968.42%
Constants394
▷ Global constants61.52%
▷ Class constants38898.48%
▷ Public constants38097.94%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-772x250.png41.09KB13.01KB▼ 68.34%
.wordpress-org/icon-256x256.png16.46KB6.79KB▼ 58.78%
.wordpress-org/banner-1544x500.png88.74KB30.13KB▼ 66.05%
.wordpress-org/icon-128x128.png6.52KB2.93KB▼ 55.01%
assets/img/nodeless.png16.46KB6.79KB▼ 58.78%