83% tipo-documento-peru

Code Review | Tipo Documento Perú

WordPress plugin Tipo Documento Perú scored83%from 54 tests.

About plugin

  • Plugin page: tipo-documento-peru
  • Plugin version: 0.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.1.1
  • WordPress version: 6.3.1
  • First release: May 10, 2021
  • Latest release: Dec 6, 2022
  • Number of updates: 11
  • Update frequency: every 52.3 days
  • Top authors: renzotejada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,234 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼12.90ms] Passed 4 tests

Server-side resources used by Tipo Documento Perú
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.25 ▼1.83
Dashboard /wp-admin3.37 ▲0.0342.99 ▼17.72
Posts /wp-admin/edit.php3.43 ▲0.0744.01 ▼5.26
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.92 ▼26.80
Media Library /wp-admin/upload.php3.30 ▲0.0736.78 ▲3.06
Document Type /wp-admin/admin.php?page=tipo_settings3.2433.18

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Tipo Documento Perú
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.23 ▼0.421.68 ▼0.0341.23 ▲0.68
Dashboard /wp-admin2,201 ▲215.56 ▼0.1087.02 ▼4.3336.91 ▼7.23
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0535.41 ▼0.8932.06 ▼4.69
Add New Post /wp-admin/post-new.php1,534 ▲823.03 ▼0.17603.21 ▼27.3666.51 ▼4.20
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.00102.82 ▼4.1044.83 ▼3.67
Document Type /wp-admin/admin.php?page=tipo_settings9002.1326.7529.92

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=tipo_settings
    • > Notice in wp-content/plugins/tipo-documento-peru/tipo_admin.php+60
    Undefined index: tab
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tipo_settings
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP Passed 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
No output text or server-side errors detected 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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: per, documento, dni, ruc, pasaporte

tipo-documento-peru/tipo-documento.php 77% from 13 tests

"Tipo Documento Perú" version 0.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tipo-documento-peru.php" instead of "tipo-documento.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.2" instead of "2.6")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin436 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34827278
PO File1293288
JavaScript112170

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin