84% cf7-cep-autofill

Code Review | Autopreenchimento de endereço em formulários

WordPress plugin Autopreenchimento de endereço em formulários scored84%from 54 tests.

About plugin

  • Plugin page: cf7-cep-autofill
  • Plugin version: 1.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2018
  • Latest release: Jan 20, 2023
  • Number of updates: 26
  • Update frequency: every 65.1 days
  • Top authors: fabbricaweb (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /11,319 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼4.69ms] Passed 4 tests

A check of server-side resources used by Autopreenchimento de endereço em formulários
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.13 ▼1.52
Dashboard /wp-admin3.31 ▲0.0150.49 ▼2.53
Posts /wp-admin/edit.php3.36 ▲0.0051.13 ▼0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.61 ▼14.65
Media Library /wp-admin/upload.php3.23 ▲0.0039.54 ▲7.04

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Autopreenchimento de endereço em formulários
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16013.55 ▼0.576.13 ▲4.1440.80 ▼1.06
Dashboard /wp-admin2,206 ▲185.83 ▲0.93100.22 ▼3.8639.49 ▼2.05
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0239.78 ▼0.5733.83 ▼3.50
Add New Post /wp-admin/post-new.php1,533 ▲1923.15 ▲5.52691.56 ▲30.5856.81 ▲4.23
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.03100.48 ▼4.5242.52 ▼3.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cf7-cep-autofill/cf7-cep-autofill.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-cep-autofill/cf7-cep-autofill.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

cf7-cep-autofill/cf7-cep-autofill.php Passed 13 tests

The main file in "Autopreenchimento de endereço em formulários" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
Preenchimento automático de campos de endereço baseado no CEP informado.

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 plugin80 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1111240
HTML30030
PHP131710

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin