79% consumer-financing-by-chargeafter

Code Review | Consumer Financing by ChargeAfter

WordPress plugin Consumer Financing by ChargeAfter scored79%from 54 tests.

About plugin

  • Plugin page: consumer-financin...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 30, 2020
  • Latest release: Aug 28, 2023
  • Number of updates: 44
  • Update frequency: every 22.8 days
  • Top authors: yuriykipnis (65.91%)baha2705 (36.36%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,091 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.12ms] Passed 4 tests

This is a short check of server-side resources used by Consumer Financing by ChargeAfter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.05 ▼9.28
Dashboard /wp-admin3.31 ▼0.0449.88 ▼14.56
Posts /wp-admin/edit.php3.36 ▲0.0048.72 ▲1.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.37 ▼14.78
Media Library /wp-admin/upload.php3.23 ▲0.0036.01 ▼1.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Consumer Financing by ChargeAfter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.72 ▲0.441.81 ▼0.4436.06 ▼5.98
Dashboard /wp-admin2,195 ▲245.61 ▼0.06100.74 ▲10.3142.74 ▼2.87
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0540.25 ▲1.8537.92 ▲1.96
Add New Post /wp-admin/post-new.php1,526 ▼923.10 ▲4.92643.34 ▲8.2764.45 ▲4.25
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0597.95 ▼8.4843.13 ▼3.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/consumer-financing-by-chargeafter/uninstall.php+16
    Invalid argument supplied for foreach()
  • Zombie WordPress options detected upon uninstall: 6 options
    • 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

consumer-financing-by-chargeafter/chargeafter-extension.php 85% from 13 tests

This is the main PHP file of "Consumer Financing by ChargeAfter" version 1.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("consumer-financing-by-chargeafter.php" instead of "chargeafter-extension.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,497 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP153157561,383
JavaScript3220114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.83
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods102
▷ Static methods5452.94%
▷ Public methods9492.16%
▷ Protected methods00.00%
▷ Private methods87.84%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants24
▷ Global constants312.50%
▷ Class constants2187.50%
▷ Public constants21100.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 files were detected