84% zibal-payment-gateway-for-contact-form7

Code Review | Zibal Payment Gateway for Contact Form 7

WordPress plugin Zibal Payment Gateway for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: zibal-payment-gat...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Apr 3, 2021
  • Latest release: Jun 20, 2022
  • Number of updates: 8
  • Update frequency: every 55.6 days
  • Top authors: mzamanzadah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /764 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
Installer ran successfully

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

A check of server-side resources used by Zibal Payment Gateway for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.30 ▼0.34
Dashboard /wp-admin3.31 ▲0.0044.81 ▼0.84
Posts /wp-admin/edit.php3.36 ▲0.0041.61 ▼8.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.61 ▼18.68
Media Library /wp-admin/upload.php3.23 ▲0.0035.38 ▲1.30

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
cf7pp_my_plugin_notice_shown
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zibal Payment Gateway for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.23 ▼1.071.64 ▼0.0439.56 ▲0.58
Dashboard /wp-admin2,214 ▲235.78 ▲0.84116.42 ▲11.5349.09 ▲8.92
Posts /wp-admin/edit.php2,097 ▲81.98 ▼0.0833.55 ▼6.6141.91 ▲5.11
Add New Post /wp-admin/post-new.php1,592 ▲5622.39 ▼0.64654.12 ▲53.7473.33 ▲24.42
Media Library /wp-admin/upload.php1,399 ▲114.29 ▲0.01100.63 ▲1.3147.57 ▲4.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • cf7pp_my_plugin_notice_shown
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WPCF7_ContactForm' not found in wp-content/plugins/zibal-payment-gateway-for-contact-form7/redirect.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/zibal-payment-gateway-for-contact-form7/gateway_func.php:142

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: zibal, contact form 7, gateway, payment

zibal-payment-gateway-for-contact-form7/gateway_func.php 92% from 13 tests

The entry point to "Zibal Payment Gateway for Contact Form 7" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zibal-payment-gateway-for-contact-form7.php" instead of "gateway_func.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected595 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP218343595

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin