74% cielo-woocommerce

Code Review | Cielo WooCommerce - Solução Webservice

WordPress plugin Cielo WooCommerce - Solução Webservice scored74%from 54 tests.

About plugin

  • Plugin page: cielo-woocommerce
  • Plugin version: 4.0.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.5
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Aug 11, 2020
  • Number of updates: 54
  • Update frequency: every 48.6 days
  • Top authors: claudiosanches (83.33%)Gabriel Reguly (18.52%)

Code review

54 tests

User reviews

72 reviews

Install metrics

900+ active /36,359 total downloads


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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.49ms] Passed 4 tests

This is a short check of server-side resources used by Cielo WooCommerce - Solução Webservice
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.10 ▲1.43
Dashboard /wp-admin3.34 ▲0.0344.29 ▼1.01
Posts /wp-admin/edit.php3.39 ▲0.0344.35 ▼4.42
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.09 ▼5.94
Media Library /wp-admin/upload.php3.26 ▲0.0335.60 ▲3.54

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Cielo WooCommerce - Solução Webservice
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.09 ▼0.261.73 ▲0.1942.43 ▲0.69
Dashboard /wp-admin2,206 ▲295.51 ▼0.1082.22 ▼6.4737.58 ▼2.03
Posts /wp-admin/edit.php2,112 ▲121.99 ▲0.0036.27 ▼0.1635.27 ▼2.15
Add New Post /wp-admin/post-new.php1,539 ▲1323.05 ▼0.09690.36 ▲14.1054.61 ▲3.59
Media Library /wp-admin/upload.php1,411 ▲114.18 ▼0.07100.09 ▼11.3545.47 ▼0.89

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Cielo_Helper' not found in wp-content/plugins/cielo-woocommerce/includes/class-wc-cielo-debit-gateway.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Cielo_Helper' not found in wp-content/plugins/cielo-woocommerce/includes/class-wc-cielo-credit-gateway.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/cielo-woocommerce/includes/class-wc-cielo-helper.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: Please take inspiration from this readme.txt

cielo-woocommerce/cielo-woocommerce.php Passed 13 tests

The main PHP script in "Cielo WooCommerce - Solução Webservice" version 4.0.14 is automatically included on every request by WordPress
77 characters long description:
Works using the Cielo Webservice Solution to receive payments on WooCommerce.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/cielo-woocommerce/includes/certificates/VeriSignClass3PublicPrimaryCertificationAuthority-G5.crt
2,355 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PO File1128191349

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity38.50
▷ Minimum class complexity4.00
▷ Maximum class complexity108.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
▷ Static methods22.41%
▷ Public methods6173.49%
▷ Protected methods1821.69%
▷ Private methods44.82%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cards.png15.53KB4.52KB▼ 70.86%
assets/images/aura.png1.68KB1.59KB▼ 5.57%