84% paymentwall-for-woocommerce

Code Review | Paymentwall for Woocommerce

WordPress plugin Paymentwall for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: paymentwall-for-w...
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 4, 2015
  • Latest release: Nov 16, 2018
  • Number of updates: 53
  • Update frequency: every 25.9 days
  • Top authors: Paymentwall (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /9,099 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 gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.23ms] Passed 4 tests

This is a short check of server-side resources used by Paymentwall for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.62 ▼1.07
Dashboard /wp-admin3.31 ▼0.0444.91 ▼13.07
Posts /wp-admin/edit.php3.36 ▲0.0046.91 ▼3.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.34 ▼19.66
Media Library /wp-admin/upload.php3.23 ▲0.0035.26 ▲3.81

Server storage [IO: ▲0.14MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paymentwall for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.33 ▼0.961.82 ▲0.1339.94 ▼0.89
Dashboard /wp-admin2,206 ▲175.91 ▲0.96101.32 ▼3.0037.63 ▼9.37
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0139.86 ▼2.8234.32 ▼0.47
Add New Post /wp-admin/post-new.php1,533 ▼923.33 ▲5.08632.85 ▲16.2759.42 ▲8.03
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0393.68 ▼1.3042.49 ▼0.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.31MB] 75% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_Instance' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/lib/Paymentwall/HttpAction.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_Signature_Abstract' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/lib/Paymentwall/Signature/Widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Behat\\Behat\\Context\\BehatContext' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/features/bootstrap/PingbackContext.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_Brick' not found in wp-content/plugins/paymentwall-for-woocommerce/includes/class-paymentwall-brick-subscription.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_ApiObject' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/lib/Paymentwall/GenerericApiObject.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_ApiObject' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/lib/Paymentwall/Charge.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Behat\\Behat\\Context\\BehatContext' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/features/bootstrap/ChargeContext.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_Config' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/lib/Paymentwall/Base.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_ApiObject' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/lib/Paymentwall/Subscription.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Paymentwall_ApiObject' not found in wp-content/plugins/paymentwall-for-woocommerce/lib/paymentwall-php/lib/Paymentwall/OneTimeToken.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
  • Tested up to: Version not formatted correctly
The official readme.txt is a good inspiration

paymentwall-for-woocommerce/paymentwall-for-woocommerce.php Passed 13 tests

The principal PHP file in "Paymentwall for Woocommerce" v. 1.6.3 is loaded by WordPress automatically on each request
54 characters long description:
Official Paymentwall module for WordPress WooCommerce.

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 plugin3,190 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP355253182,450
Markdown2480277
Cucumber3360222
JavaScript120101
HTML3100100
JSON10040

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.45
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes29
▷ Abstract classes517.24%
▷ Concrete classes2482.76%
▷ Final classes00.00%
Methods228
▷ Static methods73.07%
▷ Public methods19284.21%
▷ Protected methods3515.35%
▷ Private methods10.44%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants48
▷ Global constants918.75%
▷ Class constants3981.25%
▷ Public constants39100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.55KB0.66KB0.00%