88% splittypay-groups

Code Review | Group Pay

WordPress plugin Group Pay scored88%from 54 tests.

About plugin

  • Plugin page: splittypay-groups
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.7
  • WordPress version: 6.3.1
  • First release: Apr 20, 2021
  • Latest release: Jun 18, 2021
  • Number of updates: 12
  • Update frequency: every 5.8 days
  • Top authors: splittypayplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /412 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.03ms] Passed 4 tests

An overview of server-side resources used by Group Pay
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.21 ▼5.68
Dashboard /wp-admin3.34 ▲0.0443.34 ▼7.42
Posts /wp-admin/edit.php3.40 ▲0.0441.15 ▼5.96
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.25 ▼1.05
Media Library /wp-admin/upload.php3.27 ▲0.0435.67 ▲0.86

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Group Pay
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.041.66 ▼0.4640.38 ▼6.05
Dashboard /wp-admin2,198 ▲185.66 ▼0.0083.13 ▼8.4337.64 ▼1.34
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0836.87 ▲2.6532.65 ▼5.81
Add New Post /wp-admin/post-new.php1,526 ▼223.16 ▲0.14613.74 ▼58.6557.18 ▼4.60
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.0597.76 ▼2.2944.42 ▼1.11

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

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

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Owner page: the group owner must fulfill the information.), #2 (Checkout page: the group owner can add his friends credit cards or send them payment invites.), #3 (Monitor page: everyone with the link to this page can monitor the group payment state.)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === splittypay-groups === )
The official readme.txt is a good inspiration

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

The main PHP file in "Group Pay" ver. 1.1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("splittypay-groups.php" instead of "class-wc-gateway-splittypay.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Requires at least: Required version must match 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
Success! There were no dangerous files found in this plugin189 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13269189

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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
No PNG files were detected