83% monei

Code Review | MONEI WooCommerce

WordPress plugin MONEI WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: monei
  • Plugin version: 5.7.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2017
  • Latest release: Nov 30, 2023
  • Number of updates: 104
  • Update frequency: every 23.9 days
  • Top authors: monei (100%)

Code review

54 tests

User reviews

45 reviews

Install metrics

100+ active /4,599 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
Install script ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼17.23ms] Passed 4 tests

This is a short check of server-side resources used by MONEI WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.89 ▼4.29
Dashboard /wp-admin3.23 ▼0.1232.18 ▼25.62
Posts /wp-admin/edit.php3.30 ▼0.0636.10 ▼12.45
Add New Post /wp-admin/post-new.php5.47 ▼0.4270.72 ▼26.57
Media Library /wp-admin/upload.php3.23 ▲0.0033.01 ▼2.38

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 416 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
recovery_mode_email_last_sent
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by MONEI WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,483 ▼1,26412.76 ▼1.632.33 ▲0.5837.01 ▼7.19
Dashboard /wp-admin850 ▼1,3271.36 ▼4.2714.50 ▼88.2421.83 ▼24.43
Posts /wp-admin/edit.php861 ▼1,2421.51 ▼0.456.28 ▼32.7620.03 ▼14.96
Add New Post /wp-admin/post-new.php587 ▼9391.71 ▼21.3222.52 ▼620.337.55 ▼41.28
Media Library /wp-admin/upload.php746 ▼6541.71 ▼2.4722.96 ▼73.1722.24 ▼18.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent

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 everything seems fine, this is not 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
Almost there! Just fix the following items
  • 172× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Articus\\DataTransfer\\ConfigAwareFactory' not found in wp-content/plugins/monei/vendor/monei/monei-php-sdk/src/App/ApiClientFactory.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monei/vendor/monei/monei-php-sdk/test/Model/PaymentMessageChannelTest.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/monei/vendor/monei/monei-php-sdk/lib/Model/SendPaymentLinkRequest.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/monei/vendor/guzzlehttp/psr7/src/PumpStream.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenAPI\\Client\\Model\\ModelInterface' not found in wp-content/plugins/monei/vendor/monei/monei-php-sdk/lib/Model/CancelPaymentRequest.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/monei/vendor/guzzlehttp/psr7/src/AppendStream.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monei/vendor/monei/monei-php-sdk/test/Model/InlineObjectTest.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/monei/vendor/guzzlehttp/psr7/src/BufferStream.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monei/vendor/monei/monei-php-sdk/test/Model/PaymentPaymentMethodTrustlyTest.php:42
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/monei/vendor/guzzlehttp/psr7/src/Request.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: payments, ecommerce, payment gateway, credit card, woocommerce

monei/woocommerce-gateway-monei.php 77% from 13 tests

The entry point to "MONEI WooCommerce" version 5.7.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "3.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("monei.php" instead of "woocommerce-gateway-monei.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin35,836 lines of code in 396 files:
LanguageFilesBlank linesComment linesLines of code
PHP3537,34327,66430,155
Markdown181,50404,037
JSON14001,203
JavaScript42850368
Bourne Shell113836
XML10018
SVG40013
YAML1026

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.45
▷ Minimum class complexity1.00
▷ Maximum class complexity316.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces19
Interfaces27
Traits5
Classes294
▷ Abstract classes31.02%
▷ Concrete classes29198.98%
▷ Final classes3612.37%
Methods3,098
▷ Static methods57418.53%
▷ Public methods2,94995.19%
▷ Protected methods240.77%
▷ Private methods1254.03%
Functions174
▷ Named functions2011.49%
▷ Anonymous functions15488.51%
Constants243
▷ Global constants114.53%
▷ Class constants23295.47%
▷ Public constants22195.26%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin