84% moneyme-payments-for-woocommerce

Code Review | MoneyMe Payments for WooCommerce

WordPress plugin MoneyMe Payments for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: moneyme-payments-...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 19, 2021
  • Latest release: Nov 24, 2021
  • Number of updates: 107
  • Update frequency: every 1.2 days
  • Top authors: moneymeplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /539 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.11MB] [CPU: ▼4.08ms] Passed 4 tests

A check of server-side resources used by MoneyMe Payments for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1247.23 ▲4.52
Dashboard /wp-admin3.41 ▲0.1150.92 ▼1.23
Posts /wp-admin/edit.php3.53 ▲0.1763.18 ▲1.40
Add New Post /wp-admin/post-new.php5.99 ▲0.1186.06 ▼17.98
Media Library /wp-admin/upload.php3.34 ▲0.1139.23 ▲1.48

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

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

Browser metrics Passed 4 tests

Checking browser requirements for MoneyMe Payments for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21815.52 ▲1.1474.53 ▲72.7636.49 ▼7.11
Dashboard /wp-admin2,206 ▲155.79 ▲0.92100.94 ▼6.0640.26 ▲2.25
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0034.14 ▼4.4533.61 ▼5.10
Add New Post /wp-admin/post-new.php1,513 ▼2022.63 ▼0.49684.06 ▲2.2754.93 ▲6.21
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.1198.80 ▼4.7845.04 ▼3.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/moneyme-payments-for-woocommerce/includes/functions.php:152
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/moneyme-payments-for-woocommerce/views/mme-main.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/moneyme-payments-for-woocommerce/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: finance, payments, ecommerce

moneyme-payments-for-woocommerce/index.php 92% from 13 tests

"MoneyMe Payments for WooCommerce" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("moneyme-payments-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected8,648 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript68591,1324,107
CSS4421483,202
SVG1553824
PHP66759468
Markdown14047

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods624.00%
▷ Public methods1976.00%
▷ Protected methods520.00%
▷ Private methods14.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/assets/images/user_icon.png0.59KB0.35KB▼ 40.56%
views/assets/images/icon-warning.png4.96KB3.32KB▼ 33.10%
views/assets/images/fire_icon.png3.15KB2.18KB▼ 30.75%