93% flopay-checkout-woocommerce

Code Review | Flopay Checkout For WooCommerce

WordPress plugin Flopay Checkout For WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: flopay-checkout-w...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6.1
  • WordPress version: 5.8.1
  • First release: Mar 6, 2021
  • Latest release: Jun 20, 2021
  • Number of updates: 9
  • Update frequency: every 12.2 days
  • Top authors: flopay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 155 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Flopay Checkout For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0034.56 ▲0.18
Dashboard /wp-admin3.06 ▲0.0043.65 ▼4.06
Posts /wp-admin/edit.php3.11 ▲0.0043.43 ▲2.23
Add New Post /wp-admin/post-new.php5.42 ▼0.0285.84 ▼560.40
Media Library /wp-admin/upload.php3.00 ▲0.0032.14 ▼8.60

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Flopay Checkout For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.23 ▲0.638.51 ▼0.3047.03 ▲2.37
Dashboard /wp-admin2,970 ▲395.86 ▼0.08139.64 ▼12.90105.88 ▼4.69
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0163.60 ▼1.4087.00 ▼2.10
Add New Post /wp-admin/post-new.php1,500 ▼9118.50 ▼0.27384.94 ▼0.24110.68 ▼1.29
Media Library /wp-admin/upload.php1,807 ▼35.03 ▲0.01160.69 ▼1.68118.02 ▼1.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/flopay-checkout-woocommerce/admin/partials/flopay-checkout-woocommerce-admin-display.php
    • > /wp-content/plugins/flopay-checkout-woocommerce/public/partials/flopay-checkout-woocommerce-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (Improve your Bottomline.) image missing
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt is a good inspiration

flopay-checkout-woocommerce/flopay-checkout-woocommerce.php Passed 13 tests

The main PHP file in "Flopay Checkout For WooCommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
37 characters long description:
Adds Flopay Checkout for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,088 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP135238141,968
SVG606114
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity16.75
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods37.14%
▷ Public methods3788.10%
▷ Protected methods00.00%
▷ Private methods511.90%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants30
▷ Global constants826.67%
▷ Class constants2273.33%
▷ Public constants313.64%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 1.49MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png100.66KB32.21KB▼ 68.00%
assets/images/amex.png2.05KB1.70KB▼ 16.90%
assets/images/mastercard.png1.15KB0.98KB▼ 15.07%
assets/banner-1880x609.png398.29KB148.50KB▼ 62.72%
assets/images/visa.png1.16KB1.31KB0.00%