78% culqi-full-integration

Code Review | Culqi Integracion

WordPress plugin Culqi Integracion scored 78% from 54 tests.

About plugin

  • Plugin page: culqi-full-integr...
  • Plugin version: 2.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2019
  • Latest release: Jun 7, 2021
  • Number of updates: 89
  • Update frequency: every 8.7 days
  • Top authors: gonzalesc (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

900+ active / 18,024 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.71MB] [CPU: ▲6.69ms] Passed 4 tests

Server-side resources used by Culqi Integracion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5145.97 ▲7.10
Dashboard /wp-admin4.09 ▲0.7961.36 ▲14.31
Posts /wp-admin/edit.php4.12 ▲0.7756.41 ▲8.05
Add New Post /wp-admin/post-new.php6.67 ▲0.7994.63 ▼2.72
Media Library /wp-admin/upload.php4.01 ▲0.7853.38 ▲17.28
Orders /wp-admin/edit.php?post_type=culqi_orders4.0448.55
Settings /wp-admin/admin.php?page=fullculqi_settings3.9239.68
FullCulqi Integration /wp-admin/index.php?page=fullculqi-welcome3.9245.47
Add-ons /wp-admin/admin.php?page=fullculqi_addons3.9340.30
Customers /wp-admin/edit.php?post_type=culqi_customers4.0455.76
Webhooks /wp-admin/admin.php?page=fullculqi_webhooks3.9241.66
Charges /wp-admin/edit.php?post_type=culqi_charges4.0447.17

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 309 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
fullculqi_2_0_0_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Culqi Integracion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲8313.69 ▼0.701.81 ▼0.1938.85 ▼9.95
Dashboard /wp-admin2,243 ▲585.84 ▼0.0697.08 ▼5.5940.85 ▼1.22
Posts /wp-admin/edit.php2,129 ▲402.02 ▲0.0135.10 ▼0.0933.68 ▼0.92
Add New Post /wp-admin/post-new.php1,569 ▲15623.27 ▲5.49683.83 ▲60.9868.14 ▲23.16
Media Library /wp-admin/upload.php1,428 ▲374.24 ▲0.12113.02 ▲11.3849.10 ▲1.07
Orders /wp-admin/edit.php?post_type=culqi_orders1,1302.0134.2131.78
Settings /wp-admin/admin.php?page=fullculqi_settings8852.0724.1425.05
FullCulqi Integration /wp-admin/index.php?page=fullculqi-welcome9312.0826.5951.10
Add-ons /wp-admin/admin.php?page=fullculqi_addons9292.0325.3931.75
Customers /wp-admin/edit.php?post_type=culqi_customers1,1122.0035.5435.42
Webhooks /wp-admin/admin.php?page=fullculqi_webhooks8332.1724.2527.15
Charges /wp-admin/edit.php?post_type=culqi_charges1,1222.0034.0429.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • fullculqi_2_0_0_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/examples/post.php
    • > /wp-content/plugins/culqi-full-integration/resources/layouts/admin/settings/input_pubkey.php
    • > /wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/bin/create_pear_package.php
    • > /wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/examples/basic-auth.php
    • > /wp-content/plugins/culqi-full-integration/resources/layouts/admin/settings/input_commerce.php
    • > /wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/examples/get.php
    • > /wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/examples/session.php
    • > /wp-content/plugins/culqi-full-integration/resources/layouts/admin/settings/input_seckey.php
    • > /wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/examples/cookie_jar.php
    • > /wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/examples/multiple.php
  • 184× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/culqi-full-integration/resources/layouts/admin/notice-box.php on line 2
    • > PHP Fatal error
      require(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/culqi-full-integration/vendor/gonzalesc/culqi-php/examples/06-create-customer.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/library/Requests/Exception/HTTP/414.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Culqi\\Client' not found in wp-content/plugins/culqi-full-integration/vendor/culqi/culqi-php/lib/Culqi/Resource.php:10
    • > PHP Fatal error
      require(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/culqi-full-integration/vendor/gonzalesc/culqi-php/examples/01-create-token.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/tests/Proxy/HTTP.php:3
    • > PHP Warning
      require_once(wp-content/plugins/culqi-full-integration/vendor/gonzalesc/culqi-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/culqi-full-integration/vendor/gonzalesc/culqi-php/tests/TestAutoLoad.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/culqi-full-integration/includes/admin/class-fullculqi-upgrader.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Culqi\\Resource' not found in wp-content/plugins/culqi-full-integration/vendor/culqi/culqi-php/lib/Culqi/Charges.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/culqi-full-integration/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php:15

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 Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: full integration, payment method, peru, culqi, woocommerce

culqi-full-integration/index.php 77% from 13 tests

Analyzing the main PHP file in "Culqi Integracion" version 2.0.5
The following require your attention:
  • Git Repository: An alternative Git repository was detected
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("culqi-full-integration.php" instead of "index.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected15,750 lines of code in 233 files:
LanguageFilesBlank linesComment linesLines of code
PHP1873,0895,25111,886
Markdown1754901,322
PO File2433598973
JavaScript8203194799
CSS68749452
JSON520195
YAML310558
XML22049
Bourne Shell24012
Python1104

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.39
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces4
Interfaces4
Traits0
Classes162
▷ Abstract classes31.85%
▷ Concrete classes15998.15%
▷ Final classes00.00%
Methods789
▷ Static methods11414.45%
▷ Public methods72491.76%
▷ Protected methods607.60%
▷ Private methods50.63%
Functions27
▷ Named functions2696.30%
▷ Anonymous functions13.70%
Constants60
▷ Global constants813.33%
▷ Class constants5286.67%
▷ Public constants52100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 0.33MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/welcome.png24.13KB6.89KB▼ 71.46%
resources/assets/images/letsgo_4.png38.36KB13.32KB▼ 65.27%
resources/assets/images/letsgo_2.png21.49KB7.98KB▼ 62.85%
resources/assets/images/icon_wp.png1.37KB1.74KB0.00%
resources/assets/images/letsgo_1.png15.32KB6.30KB▼ 58.87%