74% ubigeo-peru

Code Review | Ubigeo de Perú para Woocommerce y WordPress

WordPress plugin Ubigeo de Perú para Woocommerce y WordPress scored74%from 54 tests.

About plugin

  • Plugin page: ubigeo-peru
  • Plugin version: 3.7.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 7, 2015
  • Latest release: Jul 30, 2023
  • Number of updates: 126
  • Update frequency: every 23.4 days
  • Top authors: renzotejada (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active /26,545 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.47MB] [CPU: ▼0.95ms] Passed 4 tests

An overview of server-side resources used by Ubigeo de Perú para Woocommerce y WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4745.33 ▲3.30
Dashboard /wp-admin3.81 ▲0.5149.50 ▼3.48
Posts /wp-admin/edit.php3.86 ▲0.5152.12 ▲5.93
Add New Post /wp-admin/post-new.php6.33 ▲0.4585.98 ▼7.34
Media Library /wp-admin/upload.php3.67 ▲0.4538.64 ▲3.70

Server storage [IO: ▲1.30MB] [DB: ▲0.05MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: 3 new tables, 13 new options
New tables
wp_ubigeo_provincia
wp_ubigeo_distrito
wp_ubigeo_departamento
New WordPress options
ubigeo_thanks_checkbox
widget_recent-comments
ubigeo_priority_method_free_checkbox
ubigeo_checkout_checkbox
db_upgraded
ubigeo_emails_checkbox
widget_recent-posts
theysaidso_admin_options
ubigeo_title_checkbox
ubigeo_format_checkbox
...

Browser metrics Passed 4 tests

An overview of browser requirements for Ubigeo de Perú para Woocommerce y WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.58 ▼0.741.71 ▼0.4042.88 ▼3.33
Dashboard /wp-admin2,206 ▲214.86 ▼1.01112.24 ▲4.4939.42 ▼1.34
Posts /wp-admin/edit.php2,092 ▼02.00 ▲0.0339.10 ▲0.8435.93 ▼0.97
Add New Post /wp-admin/post-new.php1,542 ▲818.27 ▼5.02623.30 ▼65.5653.78 ▲4.90
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.03102.43 ▼12.2641.78 ▼8.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables were found after uninstall: 3 tables
    • wp_ubigeo_distrito
    • wp_ubigeo_provincia
    • wp_ubigeo_departamento
  • This plugin does not fully uninstall, leaving 13 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • ubigeo_title_checkbox
    • db_upgraded
    • can_compress_scripts
    • ubigeo_emails_checkbox
    • ubigeo_format_checkbox
    • ubigeo_checkout_checkbox
    • rt_ubigeo_peru_db_version
    • ubigeo_priority_method_free_checkbox
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ubigeo-peru/rt_ubigeo_lib.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ubigeo-peru/rt_ubigeo_address.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ubigeo-peru/rt_ubigeo_checkout.php:2

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: ubigeo per, provincia, peru, departamentos, distrito...

ubigeo-peru/ubigeo-peru.php 92% from 13 tests

This is the main PHP file of "Ubigeo de Perú para Woocommerce y WordPress" version 3.7.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.2" instead of "5.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,673 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP6312553,911
PO File2162232438
CSS2185163
JavaScript3161161

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions113
▷ Named functions113100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin