83% wc-installment-purchase

Code Review | WooCommerce Installment Purchase

WordPress plugin WooCommerce Installment Purchase scored83%from 54 tests.

About plugin

  • Plugin page: wc-installment-pu...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.8
  • WordPress version: 6.3.1
  • First release: Feb 25, 2019
  • Latest release: Feb 25, 2019
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: longnguyen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.97ms] Passed 4 tests

A check of server-side resources used by WooCommerce Installment Purchase
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.49 ▼7.72
Dashboard /wp-admin3.31 ▲0.0140.59 ▼7.92
Posts /wp-admin/edit.php3.36 ▲0.0043.97 ▼2.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.82 ▼5.33
Media Library /wp-admin/upload.php3.23 ▲0.0037.42 ▲3.64

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Installment Purchase
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.31 ▼1.011.70 ▼0.3140.91 ▼14.97
Dashboard /wp-admin2,206 ▲184.87 ▼0.01110.64 ▼7.2248.02 ▲5.18
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0540.58 ▲0.5935.64 ▲1.13
Add New Post /wp-admin/post-new.php1,514 ▼2017.69 ▼5.52658.96 ▲47.9454.71 ▼13.46
Media Library /wp-admin/upload.php1,385 ▼04.24 ▲0.03109.45 ▲8.9746.99 ▲3.05

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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
Good news, no errors were detected

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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-installment-purchase/inc/enqueue-script.php
    • > /wp-content/plugins/wc-installment-purchase/wc-installment-purchase.php
    • > /wp-content/plugins/wc-installment-purchase/templates/modal.php
    • > /wp-content/plugins/wc-installment-purchase/inc/ajax-process-form.php

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in wc-installment-purchase/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === wc-installment-purchase === )
You can take inspiration from this readme.txt

wc-installment-purchase/wc-installment-purchase.php 85% from 13 tests

The primary PHP file in "WooCommerce Installment Purchase" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • 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
Success! There were no dangerous files found in this plugin317 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP43612221
CSS25655
JavaScript321041

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png74.79KB19.40KB▼ 74.06%
screenshot-1.png44.48KB12.23KB▼ 72.51%