78% woocommerce-parcelas

Code Review | WooCommerce Parcelas

WordPress plugin WooCommerce Parcelas scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-parcelas
  • Plugin version: 1.3.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Apr 29, 2015
  • Latest release: Nov 14, 2023
  • Number of updates: 70
  • Update frequency: every 44.6 days
  • Top authors: filiprimo (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /35,036 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.48MB] [CPU: ▼6.65ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Parcelas
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4439.60 ▼4.82
Dashboard /wp-admin3.82 ▲0.4750.78 ▼13.94
Posts /wp-admin/edit.php3.87 ▲0.5151.81 ▲3.56
Add New Post /wp-admin/post-new.php6.40 ▲0.5186.92 ▼11.41
Media Library /wp-admin/upload.php3.74 ▲0.5138.45 ▲4.56
Parcelas /wp-admin/admin.php?page=fswp3.7135.00

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 76 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Parcelas
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.04 ▼0.061.67 ▲0.0540.31 ▼2.83
Dashboard /wp-admin2,201 ▲215.49 ▼0.1687.93 ▼9.0440.46 ▼5.50
Posts /wp-admin/edit.php2,109 ▲121.97 ▼0.0538.90 ▲2.4737.30 ▲1.80
Add New Post /wp-admin/post-new.php1,535 ▲923.45 ▲0.05605.14 ▼57.5753.34 ▼2.78
Media Library /wp-admin/upload.php1,406 ▲34.18 ▲0.01100.28 ▲0.4142.65 ▼2.34
Parcelas /wp-admin/admin.php?page=fswp1,9902.1425.6937.84

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: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woocommerce-parcelas/public/styles/public.php
  • 32× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\DefinitionContainerInterface' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/Container.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\ServiceProvider\\ServiceProviderInterface' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/ServiceProvider/BootableServiceProviderInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\ContainerAwareInterface' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/ServiceProvider/ServiceProviderInterface.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Argument\\ArgumentResolverInterface' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/Inflector/Inflector.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\ContainerAwareInterface' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/ServiceProvider/ServiceProviderAggregateInterface.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Container\\Argument\\LiteralArgument' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/Argument/Literal/FloatArgument.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Container\\Argument\\LiteralArgument' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/Argument/Literal/StringArgument.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/DefinitionContainerInterface.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Argument\\ArgumentInterface' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/Argument/DefaultValueInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Container\\Argument\\LiteralArgument' not found in wp-content/plugins/woocommerce-parcelas/vendor/league/container/src/Argument/Literal/BooleanArgument.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: in cash, financed, parcelamento, parcelas, parcelar...

woocommerce-parcelas/woocommerce-parcelas.php 92% from 13 tests

The principal PHP file in "WooCommerce Parcelas" v. 1.3.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin3,382 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP636387102,890
Markdown31000212
JSON100147
JavaScript3343108
CSS17125

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity6.04
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces17
Traits3
Classes31
▷ Abstract classes26.45%
▷ Concrete classes2993.55%
▷ Final classes26.90%
Methods210
▷ Static methods199.05%
▷ Public methods20195.71%
▷ Protected methods41.90%
▷ Private methods52.38%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants16
▷ Global constants637.50%
▷ Class constants1062.50%
▷ Public constants10100.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
PNG images were not found in this plugin