84% wc-pagaleve

Code Review | Pix 4x sem juros - Pagaleve

WordPress plugin Pix 4x sem juros - Pagaleve scored84%from 54 tests.

About plugin

  • Plugin page: wc-pagaleve
  • Plugin version: 1.6.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jun 13, 2022
  • Latest release: Jul 26, 2023
  • Number of updates: 47
  • Update frequency: every 10.3 days
  • Top authors: pagaleve (65.96%)apiki (36.17%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,247 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.40ms] Passed 4 tests

Server-side resources used by Pix 4x sem juros - Pagaleve
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.20 ▼4.62
Dashboard /wp-admin3.33 ▲0.0257.06 ▲0.20
Posts /wp-admin/edit.php3.38 ▲0.0253.49 ▼2.03
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.37 ▼12.99
Media Library /wp-admin/upload.php3.25 ▲0.0234.93 ▼5.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 77 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
wc_pagaleve_webhook_token
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pix 4x sem juros - Pagaleve
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.68 ▲0.331.50 ▼0.5044.79 ▼2.01
Dashboard /wp-admin2,232 ▲555.67 ▲0.0390.92 ▼2.8838.46 ▼3.22
Posts /wp-admin/edit.php2,135 ▲322.00 ▼0.0138.32 ▲3.2034.85 ▲1.14
Add New Post /wp-admin/post-new.php1,550 ▲2423.22 ▲0.16695.13 ▼13.3349.68 ▼15.04
Media Library /wp-admin/upload.php1,431 ▲344.16 ▼0.03102.85 ▼10.2648.07 ▼0.29

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • wc_pagaleve_webhook_token
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php on line 12
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WcPagaleve\\Controller\\GateWays\\Abstract_Payment' not found in wp-content/plugins/wc-pagaleve/src/Controller/GateWays/WcPagalevePixInCash.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php:17
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php on line 12
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php on line 14
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php on line 14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wc-pagaleve/templates/checkout/thank-you.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-pagaleve/src/Controller/GateWays/Abstract_Payment.php:27

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: qrcode, woocommerce, payments, pagaleve, cart...

wc-pagaleve/wc-pagaleve.php 85% from 13 tests

The primary PHP file in "Pix 4x sem juros - Pagaleve" version 1.6.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 374 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected3,730 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP406841,4072,728
JavaScript61300486
Sass74712239
CSS2102222
SVG10026
Markdown113024
JSON1005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.62
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces15
Interfaces0
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods218
▷ Static methods10246.79%
▷ Public methods17982.11%
▷ Protected methods104.59%
▷ Private methods2913.30%
Functions16
▷ Named functions1487.50%
▷ Anonymous functions212.50%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants266.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-128x128pxs.png5.57KB2.93KB▼ 47.35%
assets/images/icon-256x256px.png11.55KB5.46KB▼ 52.69%
assets/images/icons/logo-pix.png3.04KB3.58KB0.00%
assets/images/icons/pagaleve.png6.70KB7.24KB0.00%
assets/images/icons/pagaleve-sprites.png12.91KB13.54KB0.00%