10% oll-cielo-checkout

Code Review | OLL Cielo Checkout

WordPress plugin OLL Cielo Checkout scored10%from 54 tests.

About plugin

  • Plugin page: oll-cielo-checkout
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: May 2, 2017
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: orlandolac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,417 total downloads

Benchmarks

Plugin footprint 40% 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
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/oll-cielo-checkout/core/CheckRequeriments.php+9
    Undefined index: post_type

Server metrics [RAM: ▼1.88MB] [CPU: ▼49.93ms] Passed 4 tests

Analyzing server-side resources used by OLL Cielo Checkout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.354.86 ▼33.13
Dashboard /wp-admin2.14 ▼1.216.79 ▼51.87
Posts /wp-admin/edit.php2.14 ▼1.229.12 ▼34.17
Add New Post /wp-admin/post-new.php2.14 ▼3.757.52 ▼80.53
Media Library /wp-admin/upload.php2.14 ▼1.096.44 ▼27.37
Adicionar /wp-admin/post-new.php?post_type=cielo-payment2.8314.50
Filiais /wp-admin/edit-tags.php?taxonomy=cielo-filial&post_type=cielo-payment2.146.43
Ver tudo /wp-admin/edit.php?post_type=cielo-payment2.8415.80

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for OLL Cielo Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲17513.55 ▼1.257.81 ▲5.8939.37 ▼2.67
Dashboard /wp-admin2,246 ▲575.84 ▼0.10103.20 ▼1.9937.60 ▼3.82
Posts /wp-admin/edit.php2,134 ▲422.02 ▲0.0337.69 ▲0.2134.04 ▼3.15
Add New Post /wp-admin/post-new.php1,555 ▲3623.56 ▲0.70646.96 ▼4.2042.35 ▼12.72
Media Library /wp-admin/upload.php1,431 ▲434.22 ▼0.0494.91 ▼2.4842.67 ▲2.11
Adicionar /wp-admin/post-new.php?post_type=cielo-payment1,5402.5752.2355.36
Filiais /wp-admin/edit-tags.php?taxonomy=cielo-filial&post_type=cielo-payment1,3082.3026.8329.90
Ver tudo /wp-admin/edit.php?post_type=cielo-payment1,1101.9330.7329.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/oll-cielo-checkout/core/CheckRequeriments.php+9
    Undefined index: post_type
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cielo-payment
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method CheckRequeriments::loadAjaxPlugin() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cielo-payment
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/oll-cielo-checkout/core/CheckRequeriments.php+9
    Undefined index: post_type

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/oll-cielo-checkout/core/Translate.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cielo-payment
    • > Network (severe)
    wp-content/plugins/cielo-checkout-oll/assets/js/animatedModal/css/animate.min.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cielo-payment
    • > Network (severe)
    wp-content/plugins/cielo-checkout-oll/assets/js/cielo-checkout.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cielo-payment
    • > Network (severe)
    wp-content/plugins/cielo-checkout-oll/assets/js/animatedModal/js/animatedModal.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: credit card, cielo api, cielo, checkout, cielo checkout...

oll-cielo-checkout/cielo-checkout.php 85% from 13 tests

The main file in "OLL Cielo Checkout" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("oll-cielo-checkout.php" instead of "cielo-checkout.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 268 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected902 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP107880717
JavaScript43636148
CSS23524
SVG20113

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods18
▷ Static methods738.89%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.58MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png125.74KB36.16KB▼ 71.24%
assets/icon-128x128.png22.23KB8.03KB▼ 63.91%
assets/banner-772x25.png44.53KB16.00KB▼ 64.07%
assets/screenshot-3.png87.22KB24.36KB▼ 72.07%
assets/screenshot-2.png134.19KB37.00KB▼ 72.43%