10% credova-financial

Code Review | Credova Financial

WordPress plugin Credova Financial scored10%from 54 tests.

About plugin

  • Plugin page: credova-financial
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 27, 2019
  • Latest release: Dec 1, 2023
  • Number of updates: 190
  • Update frequency: every 7.6 days
  • Top authors: credova2019 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,404 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/credova-financial/credova-financial.php+125
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.00MB] [CPU: ▼47.75ms] Passed 4 tests

This is a short check of server-side resources used by Credova Financial
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▼0.488.44 ▼28.97
Dashboard /wp-admin3.00 ▼0.3012.18 ▼37.70
Posts /wp-admin/edit.php3.00 ▼0.3512.69 ▼37.68
Add New Post /wp-admin/post-new.php3.00 ▼2.8810.31 ▼86.64
Media Library /wp-admin/upload.php3.00 ▼0.2310.86 ▼22.76
Credova Orders /wp-admin/admin.php?page=credova3.0011.72
Add new /wp-admin/admin.php?page=credova_form3.0015.48

Server storage [IO: ▲0.27MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: 4 new tables, 7 new options
New tables
wp_credova_checkout
wp_cart_credova_info
wp_credova_logs
wp_credova_info
New WordPress options
credova_db_version
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Credova Financial
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.70 ▼0.011.62 ▼0.0839.11 ▼2.30
Dashboard /wp-admin2,207 ▲305.61 ▲0.0191.75 ▼7.8239.33 ▼3.57
Posts /wp-admin/edit.php2,117 ▲142.00 ▲0.0440.31 ▲2.2536.40 ▲1.10
Add New Post /wp-admin/post-new.php1,537 ▲1123.69 ▲0.49656.66 ▼47.2364.83 ▲13.99
Media Library /wp-admin/upload.php1,420 ▲234.16 ▼0.04109.75 ▲12.4040.23 ▼3.46
Credova Orders /wp-admin/admin.php?page=credova9782.0427.2727.00
Add new /wp-admin/admin.php?page=credova_form8332.0726.4627.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/credova-financial/credova-financial.php+125
    Trying to access array offset on value of type bool
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_cart_credova_info
    • wp_credova_logs
    • wp_credova_checkout
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=credova_form
    • > Notice in wp-content/plugins/credova-financial/credova-financial.php+135
    Trying to access array offset on value of type bool

SRP 50% from 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/credova-financial/includes/credova-admin.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/credova-financial/includes/credova-admin.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/credova-financial/includes/credova-admin.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Requires php: Invalid version format
  • Screenshots: Please add images for these screenshots: #1 (Credova Admin Settings.), #2 (Credova Admin Order Section.), #3 (Frontend Show Payment options on Product page), #4 (Once user click then they can see the payment approval screen.), #5 (Checkout page and Credova Options.)
The official readme.txt is a good inspiration

credova-financial/credova-financial.php 92% from 13 tests

This is the main PHP file of "Credova Financial" version 2.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.2.1" instead of "5.0.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin4,165 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP76006713,978
JavaScript412108
CSS16077
SVG2002

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity77.50
▷ Minimum class complexity3.00
▷ Maximum class complexity212.00
Average method complexity7.38
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods72
▷ Static methods79.72%
▷ Public methods7198.61%
▷ Protected methods00.00%
▷ Private methods11.39%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/credova-logo.png7.01KB3.20KB▼ 54.35%