78% payitmonthly-for-woocommerce

Code Review | PayItMonthly For WooCommerce

WordPress plugin PayItMonthly For WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: payitmonthly-for-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Mar 3, 2021
  • Latest release: Nov 3, 2023
  • Number of updates: 42
  • Update frequency: every 23.2 days
  • Top authors: payitmonthly (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,122 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.53ms] Passed 4 tests

This is a short check of server-side resources used by PayItMonthly For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1135.50 ▼4.88
Dashboard /wp-admin3.41 ▲0.0646.97 ▼13.65
Posts /wp-admin/edit.php3.52 ▲0.1749.34 ▲5.57
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.54 ▼3.10
Media Library /wp-admin/upload.php3.33 ▲0.1036.81 ▲3.53

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PayItMonthly For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15113.35 ▼1.037.20 ▲5.5641.17 ▼3.55
Dashboard /wp-admin2,198 ▲175.61 ▼0.0688.03 ▼26.6340.76 ▼1.67
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0840.62 ▲2.3239.10 ▲4.10
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.15653.56 ▼1.7851.62 ▲0.39
Media Library /wp-admin/upload.php1,403 ▲94.22 ▲0.06101.60 ▲4.1444.66 ▲0.89

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/payitmonthly-for-woocommerce/public/partials/payitmonthly-woocommerce-payment-gateway-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payitmonthly-for-woocommerce/includes/class/WC_PIM_Gateway.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
4 plugin tags: pay in installments, payment gateway, woocommerce, payitmonthly

payitmonthly-for-woocommerce/payitmonthly-woocommerce-payment-gateway.php 85% from 13 tests

This is the main PHP file of "PayItMonthly For WooCommerce" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payitmonthly-for-woocommerce.php" instead of "payitmonthly-woocommerce-payment-gateway.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 detected931 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13337878931
CSS1370
JavaScript10950

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.11
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods4384.31%
▷ Protected methods35.88%
▷ Private methods59.80%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin