83% payforme

Code Review | Payforme for WooCommerce

WordPress plugin Payforme for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: payforme
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2022
  • Latest release: Jun 9, 2023
  • Number of updates: 51
  • Update frequency: every 9.2 days
  • Top authors: payformeuser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.06ms] Passed 4 tests

This is a short check of server-side resources used by Payforme for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.88 ▼1.87
Dashboard /wp-admin3.40 ▲0.0951.32 ▼3.13
Posts /wp-admin/edit.php3.51 ▲0.1550.84 ▼8.16
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.93 ▼19.07
Media Library /wp-admin/upload.php3.32 ▲0.0940.97 ▼0.78

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Payforme for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▲0.071.80 ▼0.1442.48 ▲0.61
Dashboard /wp-admin2,195 ▲245.64 ▼0.0283.23 ▼14.7843.89 ▲0.69
Posts /wp-admin/edit.php2,100 ▼31.97 ▲0.0134.95 ▼3.4334.07 ▼1.78
Add New Post /wp-admin/post-new.php1,526 ▼023.35 ▼0.18674.22 ▼8.0259.57 ▲5.88
Media Library /wp-admin/upload.php1,403 ▲64.18 ▼0.02104.01 ▼5.3846.59 ▼3.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/payforme/payforme-woocommerce.php on line 20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/payforme/payforme-woocommerce.php on line 20
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/payforme/payforme-woocommerce.php on line 20

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)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: A description for screenshot #1 is missing in payforme/assets to your readme.txt
The official readme.txt might help

payforme/payforme-woocommerce.php 77% from 13 tests

The main PHP script in "Payforme for WooCommerce" version 2.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payforme.php" instead of "payforme-woocommerce.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin697 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP29396480
JavaScript33144169
CSS21433
JSON10015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions2896.55%
▷ Anonymous functions13.45%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin