83% pay-wp

Code Review | WP PAY dla WooCommerce

WordPress plugin WP PAY dla WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: pay-wp
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: May 19, 2022
  • Latest release: Jun 7, 2023
  • Number of updates: 27
  • Update frequency: every 14.3 days
  • Top authors: wpdesk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,297 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.63MB] [CPU: ▼4.98ms] Passed 4 tests

Server-side resources used by WP PAY dla WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6441.42 ▲4.84
Dashboard /wp-admin3.93 ▲0.6347.24 ▼1.59
Posts /wp-admin/edit.php3.98 ▲0.6247.59 ▼0.55
Add New Post /wp-admin/post-new.php6.51 ▲0.6285.73 ▼18.30
Media Library /wp-admin/upload.php3.85 ▲0.6238.58 ▲0.53

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,096 new files
Database: no new tables, 7 new options
New WordPress options
plugin_activation_pay-wp/pay-wp.php
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP PAY dla WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9414.44 ▲0.012.04 ▲0.1844.54 ▲7.07
Dashboard /wp-admin2,213 ▲274.84 ▼0.23100.94 ▼21.7740.18 ▼7.14
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0235.98 ▲0.9134.08 ▲1.80
Add New Post /wp-admin/post-new.php1,518 ▼1517.52 ▼5.52701.72 ▲41.1855.16 ▲1.98
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.04106.16 ▲10.5847.62 ▲4.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • plugin_activation_pay-wp/pay-wp.php
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 571× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPPayVendor\\Psr\\Log\\AbstractLogger' not found in wp-content/plugins/pay-wp/vendor_prefixed/symfony/console/Logger/ConsoleLogger.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WPPayVendor\\JMS\\Serializer\\Metadata\\Driver\\AbstractDoctrineTypeDriver' not found in wp-content/plugins/pay-wp/vendor_prefixed/jms/serializer/src/Metadata/Driver/DoctrinePHPCRTypeDriver.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WPPayVendor\\Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/pay-wp/vendor_prefixed/symfony/css-selector/Parser/Handler/IdentifierHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'WPPayVendor\\Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/pay-wp/vendor_prefixed/symfony/css-selector/Parser/Shortcut/HashParser.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'WPPayVendor\\Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/pay-wp/vendor_prefixed/symfony/css-selector/Parser/Handler/NumberHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WPPayVendor\\JMS\\Serializer\\Exception\onCastableTypeException' not found in wp-content/plugins/pay-wp/vendor_prefixed/jms/serializer/src/Exception/NonIntCastableTypeException.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'WPPayVendor\\JMS\\Serializer\\Exception\\Exception' not found in wp-content/plugins/pay-wp/vendor_prefixed/jms/serializer/src/Type/Exception/Exception.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPPayVendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/pay-wp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php:34
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/pay-wp/vendor_prefixed/wpdesk/bm-sdk/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/pay-wp/vendor_prefixed/wpdesk/bm-sdk/index.php on line 5
    • > PHP Fatal error
      Uncaught Error: Interface 'WPPayVendor\\GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/pay-wp/vendor_prefixed/guzzlehttp/promises/src/EachPromise.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: bluemedia, blik, platnosci, payments, wp pay...

pay-wp/pay-wp.php 77% from 13 tests

This is the main PHP file of "WP PAY dla WooCommerce" version 1.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.8")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin60,951 lines of code in 1,080 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,0232,60432,87858,002
JSON44002,229
JavaScript5452307
Markdown5820273
CSS3324140

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 160)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity9.94
▷ Minimum class complexity1.00
▷ Maximum class complexity259.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity160.00
Code structure
Namespaces188
Interfaces147
Traits21
Classes811
▷ Abstract classes496.04%
▷ Concrete classes76293.96%
▷ Final classes20627.03%
Methods4,886
▷ Static methods49210.07%
▷ Public methods3,81878.14%
▷ Protected methods4008.19%
▷ Private methods66813.67%
Functions426
▷ Named functions18944.37%
▷ Anonymous functions23755.63%
Constants443
▷ Global constants92.03%
▷ Class constants43497.97%
▷ Public constants38989.63%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/octolize.com.png88.91KB39.07KB▼ 56.06%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.pl.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.net.png2.36KB2.43KB0.00%
assets/images/icon-blik.png7.87KB1.43KB▼ 81.83%