10% boleto-sicoob-facil-cnab-240

Code Review | Boleto Sicoob Fácil

WordPress plugin Boleto Sicoob Fácil scored10%from 54 tests.

About plugin

  • Plugin page: boleto-sicoob-fac...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 6.3.1
  • First release: Dec 6, 2019
  • Latest release: Oct 12, 2020
  • Number of updates: 29
  • Update frequency: every 10.8 days
  • Top authors: clodoaldoevangelista (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /980 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/boleto-sicoob-facil-cnab-240/BoletoSicoobFacilCnab_Plugin.php+41
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.77MB] [CPU: ▼62.69ms] Passed 4 tests

Server-side resources used by Boleto Sicoob Fácil
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.245.57 ▼35.52
Dashboard /wp-admin2.24 ▼1.067.73 ▼52.23
Posts /wp-admin/edit.php2.24 ▼1.117.45 ▼42.60
Add New Post /wp-admin/post-new.php2.24 ▼3.667.80 ▼120.42
Media Library /wp-admin/upload.php2.24 ▼0.996.94 ▼28.35
Boleto Sicoob Facil Cnab /wp-admin/plugins.php?page=BoletoSicoobFacilCnab_PluginSettings2.357.28

Server storage [IO: ▲0.34MB] [DB: ▲0.18MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 30 new files
Database: 2 new tables, 20 new options
New tables
wp_cod_espec_titulo
wp_cod_mun
New WordPress options
can_compress_scripts
BoletoSicoobFacilCnab_Plugin_ATextInputDescInstrucao3
widget_theysaidso_widget
BoletoSicoobFacilCnab_Plugin__installed
BoletoSicoobFacilCnab_Plugin_ATextInputPercTaxaMulta
BoletoSicoobFacilCnab_Plugin_ATextInputnumContaCorrente
theysaidso_admin_options
BoletoSicoobFacilCnab_Plugin_ATextInputChaveAcessoWeb
widget_recent-comments
BoletoSicoobFacilCnab_Plugin_ATextInputDescInstrucao2
...

Browser metrics Passed 4 tests

Checking browser requirements for Boleto Sicoob Fácil
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲15813.99 ▼0.385.66 ▲3.2039.60 ▼5.19
Dashboard /wp-admin2,232 ▲324.86 ▼0.99109.37 ▲4.8940.87 ▼0.42
Posts /wp-admin/edit.php2,111 ▲112.06 ▲0.0140.52 ▲4.4636.07 ▲2.97
Add New Post /wp-admin/post-new.php1,550 ▲518.36 ▼4.58642.18 ▲45.5753.93 ▼4.72
Media Library /wp-admin/upload.php1,408 ▲84.20 ▼0.08105.15 ▼7.1344.15 ▲1.24
Boleto Sicoob Facil Cnab /wp-admin/plugins.php?page=BoletoSicoobFacilCnab_PluginSettings1,0682.0627.6630.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-style-1 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_cod_mun
    • wp_cod_espec_titulo
  • The uninstall procedure has failed, leaving 20 options in the database
    • can_compress_scripts
    • BoletoSicoobFacilCnab_Plugin_ATextInputDescInstrucao2
    • BoletoSicoobFacilCnab_Plugin_ATextInputDescInstrucao1
    • widget_theysaidso_widget
    • BoletoSicoobFacilCnab_Plugin_ATextInputDiasLimitePagamento
    • widget_recent-comments
    • BoletoSicoobFacilCnab_Plugin_ATextInputDescInstrucao5
    • theysaidso_admin_options
    • BoletoSicoobFacilCnab_Plugin_ATextInputnumCliente
    • BoletoSicoobFacilCnab_Plugin_ATextInputPercTaxaMora
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/plugins.php?page=BoletoSicoobFacilCnab_PluginSettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-style-1 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/plugins.php?page=BoletoSicoobFacilCnab_PluginSettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-ajax-handle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Almost there! Just fix the following items
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/boleto-sicoob-facil-cnab-240/boleto-sicoob-facil-cnab.php:34
    • > PHP Warning
      include_once(): Failed opening 'BOLETO_SICOOB_FACIL_CNAB_DIRBoletoSicoobFacilCnab_ShortCodeLoader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/shortcodes/shortcodes.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/pages/active-plugins.php:8
    • > PHP Warning
      include_once(BOLETO_SICOOB_FACIL_CNAB_DIRBoletoSicoobFacilCnab_ShortCodeLoader.php): failed to open stream: No such file or directory in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/shortcodes/shortcodes.php on line 6
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/pages/active-plugins.php on line 5
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/pages/active-plugins.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/create/all-pages.php:13
    • > PHP Warning
      Use of undefined constant BOLETO_SICOOB_FACIL_CNAB_DIR - assumed 'BOLETO_SICOOB_FACIL_CNAB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/shortcodes/shortcodes.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'BoletoSicoobFacilCnab_ShortCodeLoader' not found in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/shortcodes/shortcodes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/boleto-sicoob-facil-cnab-240/contents/boleto/pages/importador-cnab.php:380

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
10 plugin tags: cobrana bancria, boleto, api de boletos, donate, sicoob...

boleto-sicoob-facil-cnab-240/boleto-sicoob-facil-cnab.php 77% from 13 tests

"Boleto Sicoob Fácil" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 265 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("boleto-sicoob-facil-cnab-240.php" instead of "boleto-sicoob-facil-cnab.php")

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 detected8,458 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP225166547,818
CSS1863309
PO File1101160233
JavaScript213298

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.56
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods74
▷ Static methods00.00%
▷ Public methods4662.16%
▷ Protected methods2837.84%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin