89% credo-payment-forms

Code Review | Credo WooCommerce Payment Gateway

WordPress plugin Credo WooCommerce Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: credo-payment-forms
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 22, 2023
  • Latest release: Oct 16, 2023
  • Number of updates: 23
  • Update frequency: every 28.9 days
  • Top authors: credocentral (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /633 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.66ms] Passed 4 tests

A check of server-side resources used by Credo WooCommerce Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.93 ▲2.29
Dashboard /wp-admin3.33 ▲0.0244.76 ▼0.58
Posts /wp-admin/edit.php3.38 ▲0.0242.68 ▼3.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.06 ▼10.52
Media Library /wp-admin/upload.php3.25 ▲0.0234.76 ▼7.71

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Credo WooCommerce Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.04 ▼0.582.16 ▲0.6145.61 ▲8.40
Dashboard /wp-admin2,199 ▲215.55 ▼0.1583.78 ▼29.7839.59 ▼2.46
Posts /wp-admin/edit.php2,104 ▲72.01 ▼0.0135.09 ▼3.2830.99 ▼2.99
Add New Post /wp-admin/post-new.php1,535 ▲722.96 ▼0.13648.63 ▼56.8451.68 ▼5.86
Media Library /wp-admin/upload.php1,407 ▲104.20 ▲0.09109.08 ▼1.1946.58 ▼3.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: payment gateway mastercard, verve, woocommerce, credo, visa

credo-payment-forms/woo-credo.php 77% from 13 tests

"Credo WooCommerce Payment Gateway" version 1.0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("5.8" instead of "7.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("credo-payment-forms.php" instead of "woo-credo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,084 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2407270844
JavaScript4779240

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity91.00
▷ Minimum class complexity91.00
▷ Maximum class complexity91.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1885.71%
▷ Protected methods29.52%
▷ Private methods14.76%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
36 PNG files occupy 0.55MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/suntrust.png2.62KB2.38KB▼ 9.00%
assets/images/jaiz.png1.59KB1.42KB▼ 10.98%
assets/images/standard.png18.86KB6.70KB▼ 64.48%
assets/images/visa.png9.35KB3.12KB▼ 66.66%
assets/images/stanbic.png14.82KB4.98KB▼ 66.41%