84% calculo-do-frete-somente-com-o-cep-wc-brasil

Code Review | Cálculo do frete somente com o CEP - WC Brasil

WordPress plugin Cálculo do frete somente com o CEP - WC Brasil scored84%from 54 tests.

About plugin

  • Plugin page: calculo-do-frete-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Aug 30, 2020
  • Latest release: Mar 9, 2021
  • Number of updates: 8
  • Update frequency: every 87.1 days
  • Top authors: alvsconcelos (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /8,977 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.87ms] Passed 4 tests

Server-side resources used by Cálculo do frete somente com o CEP - WC Brasil
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.77 ▼7.15
Dashboard /wp-admin3.31 ▲0.0044.96 ▼5.81
Posts /wp-admin/edit.php3.36 ▲0.0050.67 ▲5.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.53 ▼11.89
Media Library /wp-admin/upload.php3.23 ▲0.0038.58 ▲5.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Cálculo do frete somente com o CEP - WC Brasil
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼1.211.78 ▼0.0341.28 ▼2.41
Dashboard /wp-admin2,206 ▲185.81 ▲0.93103.46 ▼12.9340.61 ▼7.52
Posts /wp-admin/edit.php2,092 ▲32.15 ▲0.0240.50 ▲6.3435.65 ▲1.30
Add New Post /wp-admin/post-new.php1,514 ▼1417.86 ▼0.34662.69 ▲6.0658.74 ▲8.37
Media Library /wp-admin/upload.php1,388 ▲64.20 ▼0.0594.01 ▼5.6841.10 ▼1.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/calculo-do-frete-somente-com-o-cep-wc-brasil/public/partials/wc-br-shipping-only-with-cep-public-display.php
    • > /wp-content/plugins/calculo-do-frete-somente-com-o-cep-wc-brasil/admin/partials/wc-br-shipping-only-with-cep-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: calculadora de frete, cep, venda, woocommerce, frete...

calculo-do-frete-somente-com-o-cep-wc-brasil/wc-br-shipping-only-with-cep.php 85% from 13 tests

The main file in "Cálculo do frete somente com o CEP - WC Brasil" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("calculo-do-frete-somente-com-o-cep-wc-brasil.php" instead of "wc-br-shipping-only-with-cep.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin443 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12118517425
JavaScript322718
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin