72% document-data-automation

Code Review | Document & Data Automation

WordPress plugin Document & Data Automation scored72%from 54 tests.

About plugin

  • Plugin page: document-data-aut...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Sep 14, 2017
  • Latest release: Nov 2, 2020
  • Number of updates: 37
  • Update frequency: every 31.0 days
  • Top authors: docxpersso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,261 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Document & Data Automation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2841.17 ▲0.89
Dashboard /wp-admin3.63 ▲0.2851.51 ▼16.41
Posts /wp-admin/edit.php3.74 ▲0.3846.77 ▲3.37
Add New Post /wp-admin/post-new.php5.14 ▼0.7559.18 ▼37.57
Media Library /wp-admin/upload.php3.46 ▲0.2328.54 ▼8.11
Options /wp-admin/admin.php?page=document-data-automation/views/options.php3.6433.55
Users /wp-admin/admin.php?page=document-data-automation/views/DXOoptionsUsers.php3.5836.08
Docxpresso documents /wp-admin/admin.php?page=document-data-automation/views/DXOEdit.php3.5333.70
Docxpresso documents /wp-admin/admin.php?page=document-data-automation/views/DXOResponseURL.php3.5133.39
Docxpresso documents /wp-admin/admin.php?page=document-data-automation/views/DXODownload.php3.5130.17
Templates /wp-admin/admin.php?page=document-data-automation/views/template.php3.6831.28

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Document & Data Automation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12014.77 ▲0.142.08 ▲0.2944.91 ▲1.05
Dashboard /wp-admin2,232 ▲445.86 ▲0.0497.70 ▼6.9087.23 ▲48.27
Posts /wp-admin/edit.php2,127 ▲382.02 ▼0.0034.30 ▼2.4534.46 ▼3.68
Add New Post /wp-admin/post-new.php6,396 ▲4,86628.23 ▲4.96955.45 ▲201.4640.01 ▼23.92
Media Library /wp-admin/upload.php1,438 ▲594.13 ▼0.16120.44 ▲17.7447.08 ▲2.78
Options /wp-admin/admin.php?page=document-data-automation/views/options.php1,6912.8662.8762.81
Users /wp-admin/admin.php?page=document-data-automation/views/DXOoptionsUsers.php9501.7325.0328.36
Docxpresso documents /wp-admin/admin.php?page=document-data-automation/views/DXOEdit.php6171.416.9812.36
Docxpresso documents /wp-admin/admin.php?page=document-data-automation/views/DXOResponseURL.php7671.960.033.44
Docxpresso documents /wp-admin/admin.php?page=document-data-automation/views/DXODownload.php6171.417.604.60
Templates /wp-admin/admin.php?page=document-data-automation/views/template.php8382.5029.6525.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% 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=document-data-automation/views/options.php
    • > Notice in wp-content/plugins/document-data-automation/views/options.php+176
    Undefined index: dxoRedirectType
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/DXODownload.php
    • > Notice in wp-content/plugins/document-data-automation/views/DXODownload.php+19
    Undefined index: template
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/DXODownload.php
    • > Notice in wp-content/plugins/document-data-automation/views/DXODownload.php+20
    Undefined index: token
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/DXOEdit.php
    • > Notice in wp-content/plugins/document-data-automation/views/DXOEdit.php+13
    Undefined index: metaData
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/template.php
    • > Notice in wp-content/plugins/document-data-automation/views/template.php+30
    Undefined index: pKey
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/template.php
    • > Notice in wp-content/plugins/document-data-automation/views/template.php+58
    Undefined index: DocxpressoUrl
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/template.php
    • > Notice in wp-content/plugins/document-data-automation/views/template.php+32
    Undefined index: email

SRP 50% from 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
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/document-data-automation/views/DXOoptionsUsers.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/document-data-automation/views/partials/dashboard_admin.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/admin.php): failed to open stream: No such file or directory in wp-content/plugins/document-data-automation/views/DXOoptionsUsers.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/document-data-automation/views/partials/dashboard_user.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/document-data-automation/views/DXOoptionsUsers.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/document-data-automation/widgets.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/DXOResponseURL.php
    • > Network (severe)
    documents/preview/?uniqid=6524054d88eb04766159&timestamp=1696859469&APIKEY=a829d52f6284a135a3f3eba1f0f705f7ae383d54&options=eyJkaXNwbGF5IjoiZG9jdW1lbnQiLCJlbmR1c2VyaWQiOiIiLCJyZWZlcmVuY2UiOiIiLCJyZXNwb25zZVVSTCI6Imh0dHA6XC9cL3dwLmNvbVwvd3AtYWRtaW5cL2FkbWluLnBocD9wYWdlPWRvY3VtZW50LWRhdGEtYXV0b21hdGlvbiUyRnZpZXdzJTJGRFhPUmVzcG9uc2VVUkwucGhwIiwicGx1Z2luIjoxfQ,, - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/DXODownload.php
    • > Network (severe)
    documents/getFullDocumentation/?uniqid=65240550d096f7597492&timestamp=1696859472&APIKEY=1d1bace46c15e6d96081a916d71f8ce659581b1b&options=eyJ0b2tlbiI6bnVsbH0, - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/template.php
    • > Network (severe)
    RESTservices/predefined/last_used_templates/10?uniqid=6524055279d753330400&timestamp=1696859474&APIKEY=cf4271fa8cf3e5f70e92d6eba08b523a3d151eec&callback=jQuery37008561849624125255_1696859474530&_=1696859474531 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=document-data-automation/views/template.php
    • > Network (severe)
    RESTservices/predefined/latest_templates/10/NULL/0?uniqid=6524055279d82386933&timestamp=1696859474&APIKEY=57b844102867529448f1093d48e8dba6c1a42077&callback=jQuery37008561849624125255_1696859474532&_=1696859474533 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: docxpresso, documents, online documents, forms, data

document-data-automation/document-data-automation.php 85% from 13 tests

The main PHP file in "Document & Data Automation" ver. 1.6.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected4,772 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP143061682,443
JavaScript122432541,706
CSS2454312
PO File1118118288
Pascal151723

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity275.00
▷ Minimum class complexity275.00
▷ Maximum class complexity275.00
Average method complexity5.35
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods63
▷ Static methods00.00%
▷ Public methods6095.24%
▷ Protected methods00.00%
▷ Private methods34.76%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/micrologo.png0.45KB0.36KB▼ 18.42%
img/logo.png17.00KB2.29KB▼ 86.53%
img/icono-dx-wp.png0.53KB0.35KB▼ 34.92%
img/micro-dxo-wp.png0.57KB0.51KB▼ 10.65%