88% splittypay-green

Code Review | Green pay

WordPress plugin Green pay scored88%from 54 tests.

About plugin

  • Plugin page: splittypay-green
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.7
  • WordPress version: 6.3.1
  • First release: Apr 21, 2021
  • Latest release: Aug 2, 2021
  • Number of updates: 20
  • Update frequency: every 5.2 days
  • Top authors: splittypayplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /465 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.04MB] [CPU: ▼4.49ms] Passed 4 tests

This is a short check of server-side resources used by Green pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.50 ▼2.76
Dashboard /wp-admin3.35 ▲0.0443.08 ▼7.19
Posts /wp-admin/edit.php3.40 ▲0.0448.21 ▲2.92
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.38 ▼7.21
Media Library /wp-admin/upload.php3.27 ▲0.0434.27 ▼0.81

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Green pay
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.23 ▼1.151.74 ▼0.0845.85 ▲2.94
Dashboard /wp-admin2,206 ▲154.88 ▲0.00107.68 ▼11.9239.51 ▼4.83
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0139.23 ▲2.5734.66 ▲0.35
Add New Post /wp-admin/post-new.php1,536 ▲1923.27 ▲5.75688.27 ▲31.9256.66 ▲4.66
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0795.58 ▼3.9441.94 ▲0.60

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === splittypay-green === )
  • Screenshots: Add images for these screenshots: #1 (Checkout page: the customer must fulfill the payment information.), #2 (Success page: the customer completes his order.)
The official readme.txt might help

splittypay-green/class-wc-gateway-splittypay-green.php 69% from 13 tests

"Green pay" version 1.1.8'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:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("splittypay-green.php" instead of "class-wc-gateway-splittypay-green.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0.1" instead of "2.2")

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
There were no executable files found in this plugin190 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13475190

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods333.33%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/splittypay.png24.28KB8.68KB▼ 64.26%