72% melhor-envio-cotacao

Code Review | Melhor Envio

WordPress plugin Melhor Envio scored72%from 54 tests.

About plugin

  • Plugin page: melhor-envio-cotacao
  • Plugin version: 2.14.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 24, 2018
  • Latest release: Aug 15, 2023
  • Number of updates: 545
  • Update frequency: every 3.7 days
  • Top authors: vhasoares (86.79%)melhorenvio (13.39%)

Code review

54 tests

User reviews

55 reviews

Install metrics

10,000+ active /342,778 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▲0.99ms] Passed 4 tests

This is a short check of server-side resources used by Melhor Envio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6146.78 ▲2.45
Dashboard /wp-admin3.95 ▲0.6552.42 ▼1.58
Posts /wp-admin/edit.php4.07 ▲0.7153.36 ▲5.28
Add New Post /wp-admin/post-new.php6.56 ▲0.6793.48 ▼0.62
Media Library /wp-admin/upload.php3.88 ▲0.6543.38 ▲3.73

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

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

Browser metrics Passed 4 tests

Melhor Envio: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲13713.43 ▼0.719.68 ▲7.3744.91 ▼2.43
Dashboard /wp-admin2,241 ▲645.68 ▲0.0091.56 ▼12.4245.44 ▼0.78
Posts /wp-admin/edit.php2,146 ▲432.09 ▲0.0845.81 ▲10.7637.94 ▲2.72
Add New Post /wp-admin/post-new.php1,562 ▲3623.46 ▲0.17689.71 ▲28.2562.18 ▲9.12
Media Library /wp-admin/upload.php1,443 ▲434.16 ▲0.02101.84 ▼4.0747.85 ▲4.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • melhorenvio_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • melhorenvio_installed
    • db_upgraded
    • wp_option_notices_melhor_envio
    • widget_recent-posts

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MelhorEnvio\\Controllers\\add_action() in wp-content/plugins/melhor-envio-cotacao/Controllers/QuotationController.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 75% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in melhor-envio-cotacao/assets to your readme.txt
  • Contributors: Plugin contributors field is missing
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

melhor-envio-cotacao/melhor-envio-beta.php 77% from 13 tests

Analyzing the main PHP file in "Melhor Envio" version 2.14.0
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("melhor-envio-cotacao.php" instead of "melhor-envio-beta.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "4.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Please fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .out - Executable in Linux
      • wp-content/plugins/melhor-envio-cotacao/a.out
14,872 lines of code in 238 files:
LanguageFilesBlank linesComment linesLines of code
PHP1272,1062,7677,702
Vuejs Component16136332,851
Stylus59310352,369
JavaScript24143411,586
Markdown1570158
JSON40090
CSS413968
PO File33048

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity8.42
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes122
▷ Abstract classes10.82%
▷ Concrete classes12199.18%
▷ Final classes10.83%
Methods459
▷ Static methods4910.68%
▷ Public methods38483.66%
▷ Protected methods10.22%
▷ Private methods7416.12%
Functions42
▷ Named functions00.00%
▷ Anonymous functions42100.00%
Constants207
▷ Global constants62.90%
▷ Class constants20197.10%
▷ Public constants20099.50%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin