89% mercalona-woo-etiqueta-correios

Code Review | Correios - Etiqueta, Declaração Conteúdo & Sigep

WordPress plugin Correios - Etiqueta, Declaração Conteúdo & Sigep scored 89% from 54 tests.

About plugin

  • Plugin page: mercalona-woo-eti...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Sep 12, 2019
  • Number of updates: 12
  • Update frequency: every 1.2 days
  • Top authors: gabrielpasche (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active / 3,081 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.02MB] [CPU: ▼2.00ms] Passed 4 tests

This is a short check of server-side resources used by Correios - Etiqueta, Declaração Conteúdo & Sigep
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.74 ▲0.37
Dashboard /wp-admin3.32 ▲0.0250.97 ▼4.24
Posts /wp-admin/edit.php3.38 ▲0.0251.08 ▼1.65
Add New Post /wp-admin/post-new.php5.92 ▲0.04117.14 ▲23.20
Media Library /wp-admin/upload.php3.25 ▲0.0238.73 ▼2.49
Etiqueta Correios /wp-admin/admin.php?page=woo-etiqueta-correios3.2132.79

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Correios - Etiqueta, Declaração Conteúdo & Sigep: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4013.22 ▼1.182.03 ▲0.1649.52 ▲3.20
Dashboard /wp-admin2,207 ▲44.84 ▼0.95110.78 ▲15.2839.64 ▲0.93
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0042.84 ▲5.0735.28 ▲1.67
Add New Post /wp-admin/post-new.php1,527 ▲818.25 ▼4.86604.50 ▼61.6662.58 ▲2.03
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.1098.97 ▼11.7742.54 ▼0.22
Etiqueta Correios /wp-admin/admin.php?page=woo-etiqueta-correios1,4638.40215.1865.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: correios, pdf, woocommerce, mercalona, impressao

mercalona-woo-etiqueta-correios/woo-etiqueta-correios.php 85% from 13 tests

The entry point to "Correios - Etiqueta, Declaração Conteúdo & Sigep" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mercalona-woo-etiqueta-correios.php" instead of "woo-etiqueta-correios.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin419 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP148845416
JavaScript1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods2769.23%
▷ Protected methods00.00%
▷ Private methods1230.77%
Functions3
▷ Named functions3100.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