72% preenchimento-automatico-cep-brasil

Code Review | Preenchimento Automatico CEP Brasil

WordPress plugin Preenchimento Automatico CEP Brasil scored72%from 54 tests.

About plugin

  • Plugin page: preenchimento-aut...
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Oct 19, 2021
  • Latest release: May 30, 2022
  • Number of updates: 11
  • Update frequency: every 20.2 days
  • Top authors: mestresdowp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,548 total downloads

Benchmarks

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

An overview of server-side resources used by Preenchimento Automatico CEP Brasil
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.36 ▼3.68
Dashboard /wp-admin3.32 ▲0.0251.38 ▲2.92
Posts /wp-admin/edit.php3.37 ▲0.0153.04 ▲1.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.33 ▼21.20
Media Library /wp-admin/upload.php3.24 ▲0.0137.04 ▼1.55
CEP Automático /wp-admin/admin.php?page=pacepbr_wp3.2334.04

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Preenchimento Automatico CEP Brasil
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.31 ▼1.281.90 ▲0.1844.10 ▼0.75
Dashboard /wp-admin2,218 ▲305.90 ▲0.03103.92 ▼14.5982.54 ▲37.82
Posts /wp-admin/edit.php2,116 ▲272.03 ▲0.0238.06 ▼4.7635.55 ▲0.72
Add New Post /wp-admin/post-new.php1,541 ▲823.13 ▼0.26730.57 ▲83.0453.45 ▼1.50
Media Library /wp-admin/upload.php1,409 ▲304.24 ▲0.06100.46 ▼2.6873.29 ▲29.97
CEP Automático /wp-admin/admin.php?page=pacepbr_wp1,0702.2228.9542.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/mwp-pacwp-html-form.php+35
    include(html/documentacao.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/mwp-pacwp-html-form.php+35
    include(): Failed opening 'html/documentacao.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/mwp-pacwp-html-form.php+35
    include(html/plugins.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/mwp-pacwp-html-form.php+35
    include(): Failed opening 'html/plugins.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php+6
    simplexml_load_file(): https://www.mestresdowp.com.br/checkout/artigos.php:1: parser error : Start tag expected, '<' not found
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php+6
    simplexml_load_file(): [{"ID":306678,"post_author":"2","post_date":"2023-09-30 10:00:00","post_date_gmt
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php+6
    simplexml_load_file(): ^
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Notice in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php+8
    Trying to get property 'artigo' of non-object
    • > GET request to /wp-admin/admin.php?page=pacepbr_wp
    • > Warning in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php+8
    Invalid argument supplied for foreach()

SRP 0% 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-copyright.php
    • > /wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      simplexml_load_file(): ^ in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/config.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/mwp-pacwp-html-form.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/preenchimento-automatico-cep-brasil/includes/mwp-pacwp-scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/preenchimento-automatico-cep-brasil/includes/mwp-pacwp-hooks.php:2
    • > PHP Warning
      simplexml_load_file(): https://www.mestresdowp.com.br/checkout/artigos.php:1: parser error : Start tag expected, '<' not found in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php on line 6
    • > PHP Notice
      Undefined variable: mwp_url_icons in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/config.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/mwp-pacwp-admin.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php on line 8
    • > PHP Notice
      Trying to get property 'artigo' of non-object in wp-content/plugins/preenchimento-automatico-cep-brasil/admin/includes/html/mestres-wp-sidebar.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === preenchimento-automatico-cep-brasil === )
You can take inspiration from this readme.txt

preenchimento-automatico-cep-brasil/preenchimento-automatico-cep.php 92% from 13 tests

The entry point to "Preenchimento Automatico CEP Brasil" version 1.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("preenchimento-automatico-cep-brasil.php" instead of "preenchimento-automatico-cep.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
Success! There were no dangerous files found in this plugin361 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP81114252
CSS1110109

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.19
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/mwp-logotipo.png4.97KB2.46KB▼ 50.49%
admin/assets/images/bytesize_settings.png1.23KB0.70KB▼ 43.11%
admin/assets/images/mwp-ico-off.png1.33KB0.73KB▼ 45.19%
admin/assets/images/mwp-ico-on.png1.34KB0.69KB▼ 48.18%
admin/assets/images/faviconmwp.png0.58KB0.62KB0.00%