94% preenche-endereco-cep

Code Review | Preenche endereço CEP para Woocommerce

WordPress plugin Preenche endereço CEP para Woocommerce scored 94% from 54 tests.

About plugin

  • Plugin page: preenche-endereco...
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 5.8.1
  • First release: Jul 4, 2020
  • Latest release: Jul 31, 2020
  • Number of updates: 13
  • Update frequency: every 2.2 days
  • Top authors: anhagaabaete (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 2,343 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Preenche endereço CEP para Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.68 ▼0.0523.32 ▼4.11
Dashboard /wp-admin3.06 ▲0.0149.76 ▲12.30
Posts /wp-admin/edit.php3.11 ▲0.0145.46 ▲1.75
Add New Post /wp-admin/post-new.php5.43 ▼0.0191.71 ▼545.25
Media Library /wp-admin/upload.php3.01 ▲0.0027.82 ▼4.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Preenche endereço CEP para Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,254 ▼34215.69 ▲0.040.42 ▼9.1111.24 ▼40.63
Dashboard /wp-admin2,973 ▲396.13 ▲0.03154.68 ▲3.75114.24 ▼2.84
Posts /wp-admin/edit.php2,739 ▲32.70 ▲0.0168.86 ▲1.4597.30 ▲3.42
Add New Post /wp-admin/post-new.php1,508 ▼12218.88 ▼0.04377.84 ▼25.16113.86 ▼11.57
Media Library /wp-admin/upload.php1,810 ▲625.01 ▼0.01152.36 ▼6.98120.01 ▼12.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/preenche-endereco-cep/wc-preenche-endereco-cep.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: estado, autopreenchimento, bairro, cidade, woocommerce...

preenche-endereco-cep/wc-preenche-endereco-cep.php 92% from 13 tests

Analyzing the main PHP file in "Preenche endereço CEP para Woocommerce" version 1.5.1
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("preenche-endereco-cep.php" instead of "wc-preenche-endereco-cep.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin96 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14076
PHP1112420

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected