89% fd-payments-for-woo

Code Review | Payment Gateway Payeezy for WooCommerce

WordPress plugin Payment Gateway Payeezy for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: fd-payments-for-woo
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 19, 2015
  • Latest release: Sep 7, 2023
  • Number of updates: 38
  • Update frequency: every 75.1 days
  • Top authors: cardpaysolutions (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /18,696 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Payment Gateway Payeezy for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.79 ▼2.83
Dashboard /wp-admin3.35 ▲0.0144.29 ▼15.18
Posts /wp-admin/edit.php3.40 ▲0.0546.86 ▼1.36
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.22 ▼20.96
Media Library /wp-admin/upload.php3.28 ▲0.0535.93 ▲0.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Gateway Payeezy for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.23 ▼1.361.68 ▼0.0141.08 ▼2.35
Dashboard /wp-admin2,206 ▲154.84 ▼1.02100.81 ▼6.0242.49 ▲4.03
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0335.38 ▼6.2730.38 ▼7.17
Add New Post /wp-admin/post-new.php1,533 ▲1423.34 ▲0.11675.24 ▼13.3064.58 ▲10.10
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0296.38 ▼7.1843.72 ▼2.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

fd-payments-for-woo/woocommerce-payeezy.php 69% from 13 tests

"Payment Gateway Payeezy for WooCommerce" version 2.1.1'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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fd-payments-for-woo.php" instead of "woocommerce-payeezy.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "2.2.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 169 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,515 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP102718562,317
JavaScript2110155
CSS10043

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity34.62
▷ Minimum class complexity16.00
▷ Maximum class complexity51.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods96
▷ Static methods11.04%
▷ Public methods8285.42%
▷ Protected methods1010.42%
▷ Private methods44.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin