84% enviamelo

Code Review | Enviamelo (Argentina)

WordPress plugin Enviamelo (Argentina) scored84%from 54 tests.

About plugin

  • Plugin page: enviamelo
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 14, 2021
  • Latest release: Dec 14, 2021
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: manuelaborghi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.46ms] Passed 4 tests

An overview of server-side resources used by Enviamelo (Argentina)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.95 ▼0.84
Dashboard /wp-admin3.31 ▼0.0447.32 ▼9.95
Posts /wp-admin/edit.php3.36 ▲0.0045.68 ▼4.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.04 ▼14.52
Media Library /wp-admin/upload.php3.23 ▲0.0034.79 ▲1.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Enviamelo (Argentina): an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.23 ▼0.131.99 ▲0.0845.69 ▲4.14
Dashboard /wp-admin2,195 ▲155.64 ▼0.0594.99 ▲8.4241.71 ▲1.69
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0436.46 ▼4.3131.94 ▼5.94
Add New Post /wp-admin/post-new.php1,526 ▼523.49 ▲0.35670.25 ▲29.4149.81 ▼4.64
Media Library /wp-admin/upload.php1,403 ▲34.24 ▲0.03101.03 ▼7.1442.67 ▼4.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Trait 'Ecomerciar\\Enviamelo\\Helper\oticesTrait' not found in wp-content/plugins/enviamelo/Helper/Helper.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Ecomerciar\\Enviamelo\\Api\\ApiConnector' not found in wp-content/plugins/enviamelo/Api/EnviameloApi.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 uses markdown syntax to describe your plugin to the world
3 plugin tags: enviamelo, woocommerce, shipments

enviamelo/woo-enviamelo-arg.php 92% from 13 tests

The entry point to "Enviamelo (Argentina)" version 1.0.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("enviamelo.php" instead of "woo-enviamelo-arg.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
Success! There were no dangerous files found in this plugin1,807 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP222926461,807

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.37
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces7
Interfaces1
Traits6
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods92
▷ Static methods6267.39%
▷ Public methods8996.74%
▷ Protected methods11.09%
▷ Private methods22.17%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.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
There were not PNG files found in your plugin