78% unienvios

Code Review | Unienvios

WordPress plugin Unienvios scored78%from 54 tests.

About plugin

  • Plugin page: unienvios
  • Plugin version: 1.4.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Oct 15, 2021
  • Latest release: Sep 15, 2022
  • Number of updates: 31
  • Update frequency: every 10.8 days
  • Top authors: lucascreativecode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /473 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.04MB] [CPU: ▼0.31ms] Passed 4 tests

Server-side resources used by Unienvios
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0436.08 ▼0.20
Dashboard /wp-admin3.34 ▲0.0450.24 ▲1.47
Posts /wp-admin/edit.php3.39 ▲0.0447.98 ▲2.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.28 ▼0.80
Media Library /wp-admin/upload.php3.26 ▲0.0432.40 ▼1.72

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Unienvios
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.24 ▼0.271.81 ▲0.0738.07 ▼7.02
Dashboard /wp-admin2,195 ▲175.55 ▼0.1390.95 ▼13.5637.11 ▼7.47
Posts /wp-admin/edit.php2,103 ▼02.02 ▲0.0740.06 ▲4.0735.90 ▲2.41
Add New Post /wp-admin/post-new.php1,526 ▼023.23 ▲0.33588.48 ▼71.1850.30 ▼6.10
Media Library /wp-admin/upload.php1,400 ▼04.25 ▼0.0394.64 ▼20.1742.03 ▼7.67

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/unienvios/form-page-product.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/unienvios/ClassUnienvios.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unienvios/options.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/unienvios/index.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Página do Produto com o campo de calcular frete da unienvios.), #2 (Página de Configuração do plug-in.)
The official readme.txt is a good inspiration

unienvios/index.php 92% from 13 tests

Analyzing the main PHP file in "Unienvios" version 1.4.3
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("unienvios.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,048 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5136137508
JavaScript27262489
CSS19051

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.50
▷ Minimum class complexity6.00
▷ Maximum class complexity7.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
3 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshots/1.png46.79KB20.14KB▼ 56.96%
assets/screenshots/2.png25.33KB13.08KB▼ 48.34%
assets/icon/favicon.7d40b497-svg-20px.png0.86KB1.45KB0.00%