83% woocommerce-click-pledge-gateway

Code Review | WooCommerce Click & Pledge Gateway

WordPress plugin WooCommerce Click & Pledge Gateway scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-click...
  • Plugin version: 2.23100000-WP6.3.2-W...
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Oct 16, 2023
  • Number of updates: 104
  • Update frequency: every 29.3 days
  • Top authors: ClickandPledge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /5,609 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.32ms] Passed 4 tests

A check of server-side resources used by WooCommerce Click & Pledge Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.19 ▼3.49
Dashboard /wp-admin3.31 ▼0.0344.77 ▼14.88
Posts /wp-admin/edit.php3.42 ▲0.0748.53 ▲6.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.73 ▼24.35
Media Library /wp-admin/upload.php3.23 ▲0.0131.99 ▼2.56

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Click & Pledge Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.24 ▼0.411.91 ▲0.0742.45 ▼5.25
Dashboard /wp-admin2,211 ▲345.50 ▼0.1782.54 ▼18.2843.95 ▲2.36
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0135.75 ▼3.1636.34 ▼0.77
Add New Post /wp-admin/post-new.php1,544 ▲1823.16 ▲0.19651.46 ▼19.6757.42 ▲2.12
Media Library /wp-admin/upload.php1,416 ▲224.27 ▲0.0697.18 ▼0.8445.38 ▲3.57

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-click-pledge-gateway/gateway-clickandpledge.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === woocommerce-click-pledge-gateway === )
The official readme.txt is a good inspiration

woocommerce-click-pledge-gateway/gateway-clickandpledge.php 77% from 13 tests

This is the main PHP file of "WooCommerce Click & Pledge Gateway" version 2.23100000-WP6.3.2-W..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "2.23100000-WP6.3.2-W...")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-click-pledge-gateway.php" instead of "gateway-clickandpledge.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 242 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,260 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP27392214,638
XML200622

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 186)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity345.50
▷ Minimum class complexity222.00
▷ Maximum class complexity469.00
Average method complexity18.23
▷ Minimum method complexity1.00
▷ Maximum method complexity186.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/eCheck.png6.58KB2.33KB▼ 64.49%
images/image_3422.png3.51KB1.73KB▼ 50.58%
images/cards.png4.88KB1.61KB▼ 66.99%