90% woo-freecharge

Code Review | Freecharge for Woocommerce

WordPress plugin Freecharge for Woocommerce scored90%from 54 tests.

About plugin

  • Plugin page: woo-freecharge
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: Aug 24, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: vikaskapadiya (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.32ms] Passed 4 tests

Server-side resources used by Freecharge for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0732.88 ▼6.06
Dashboard /wp-admin3.38 ▲0.0343.42 ▼14.07
Posts /wp-admin/edit.php3.49 ▲0.1349.24 ▲3.25
Add New Post /wp-admin/post-new.php5.96 ▲0.0778.47 ▼13.40
Media Library /wp-admin/upload.php3.30 ▲0.0733.28 ▲0.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Freecharge for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.331.47 ▼0.2039.05 ▼3.29
Dashboard /wp-admin2,206 ▲245.88 ▲0.02111.89 ▲6.2442.77 ▲3.28
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0240.31 ▲0.1635.76 ▲1.73
Add New Post /wp-admin/post-new.php1,539 ▲2223.44 ▲5.94633.52 ▼70.0973.78 ▲14.86
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0493.16 ▼7.0040.29 ▼2.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: payment gateway, payment gateway with secure online payment gateway, woocommerce, gateway for woocommerce, freecharge...

woo-freecharge/class-wc-gateway-free-charge.php 92% from 13 tests

The main file in "Freecharge for Woocommerce" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-freecharge.php" instead of "class-wc-gateway-free-charge.php")

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
Good job! No executable or dangerous file extensions detected367 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP311484367

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods738.89%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin