84% payje-for-woocommerce

Code Review | Payje for WooCommerce

WordPress plugin Payje for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: payje-for-woocomm...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2022
  • Latest release: Jun 26, 2023
  • Number of updates: 17
  • Update frequency: every 20.4 days
  • Top authors: payjegateway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▲3.20ms] Passed 4 tests

Analyzing server-side resources used by Payje for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2850.29 ▲8.20
Dashboard /wp-admin3.58 ▲0.2852.40 ▲1.81
Posts /wp-admin/edit.php3.63 ▲0.2755.89 ▲5.47
Add New Post /wp-admin/post-new.php6.12 ▲0.2391.45 ▼2.70
Media Library /wp-admin/upload.php3.44 ▲0.2143.99 ▲8.96

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 207 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Payje for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11114.80 ▲0.231.91 ▼0.1542.24 ▼4.58
Dashboard /wp-admin2,240 ▲525.86 ▼0.0499.92 ▼12.2768.44 ▲14.47
Posts /wp-admin/edit.php2,137 ▲452.01 ▲0.0540.08 ▲3.3040.95 ▲3.99
Add New Post /wp-admin/post-new.php1,560 ▲2623.17 ▲0.08708.30 ▲1.1562.44 ▲5.63
Media Library /wp-admin/upload.php1,431 ▲404.25 ▲0.04135.44 ▲22.2358.00 ▲9.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
Everything seems fine, however 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 take a closer look at the following
  • 51× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/psr7/src/Uri.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/payje-for-woocommerce/libraries/payje/admin/views/dashboard.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/psr7/src/UploadedFile.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/payje-for-woocommerce/libraries/payje/vendor/guzzlehttp/psr7/src/FnStream.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/payje-for-woocommerce/admin/views/settings.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt is a good inspiration

payje-for-woocommerce/payje-wc.php 92% from 13 tests

"Payje for WooCommerce" version 1.0.1'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: It is recommended to name the main PHP file as the plugin slug ("payje-for-woocommerce.php" instead of "payje-wc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected18,573 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
PHP1372,4995,93711,229
Markdown171,30703,751
JavaScript56051732,412
JSON10001,045
CSS50076
SVG50144
make1409
YAML1007

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.24
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces11
Interfaces26
Traits3
Classes88
▷ Abstract classes11.14%
▷ Concrete classes8798.86%
▷ Final classes3540.23%
Methods817
▷ Static methods14417.63%
▷ Public methods67882.99%
▷ Protected methods101.22%
▷ Private methods12915.79%
Functions135
▷ Named functions4533.33%
▷ Anonymous functions9066.67%
Constants74
▷ Global constants912.16%
▷ Class constants6587.84%
▷ Public constants5483.08%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected