72% data-track

Code Review | WP Data Track

WordPress plugin WP Data Track scored72%from 54 tests.

About plugin

  • Plugin page: data-track
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 31, 2020
  • Latest release: Aug 1, 2020
  • Number of updates: 17
  • Update frequency: N/A
  • Top authors: corycollier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.54MB] [CPU: ▼18.13ms] Passed 4 tests

This is a short check of server-side resources used by WP Data Track
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1550.27 ▲10.45
Dashboard /wp-admin3.45 ▲0.1051.03 ▼12.19
Posts /wp-admin/edit.php3.56 ▲0.2153.30 ▲1.87
Add New Post /wp-admin/post-new.php3.32 ▼2.5637.33 ▼62.25
Media Library /wp-admin/upload.php3.37 ▲0.1437.07 ▲0.04
Field Types /wp-admin/edit-tags.php?taxonomy=wpdt_types&post_type=wpdt_data3.3637.58
All Data Tracking /wp-admin/edit.php?post_type=wpdt_data3.4238.24
Manage Data Track Fields /wp-admin/options-general.php?page=wpdt-plugin3.3232.26
Add Data Tracking /wp-admin/post-new.php?post_type=wpdt_data3.3235.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
recovery_mode_email_last_sent
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WP Data Track: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17414.45 ▲0.0814.35 ▲12.6341.32 ▲1.00
Dashboard /wp-admin2,240 ▲635.63 ▲0.0494.58 ▲5.3942.21 ▲0.46
Posts /wp-admin/edit.php2,142 ▲452.03 ▲0.0035.87 ▼2.5533.34 ▼0.06
Add New Post /wp-admin/post-new.php1,562 ▲3623.03 ▼0.46669.93 ▼21.0058.62 ▼0.13
Media Library /wp-admin/upload.php1,445 ▲424.19 ▼0.0294.74 ▼6.9041.57 ▼4.13
Field Types /wp-admin/edit-tags.php?taxonomy=wpdt_types&post_type=wpdt_data1,3162.1226.7830.49
All Data Tracking /wp-admin/edit.php?post_type=wpdt_data1,1621.9730.6429.83
Manage Data Track Fields /wp-admin/options-general.php?page=wpdt-plugin7211.516.5115.76
Add Data Tracking /wp-admin/post-new.php?post_type=wpdt_data6,21719.70851.0136.04

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wpdt-plugin
    • > Error in wp-content/plugins/data-track/inc/admin/options.php+151
    Uncaught Error: Call to undefined function wpdt_admin_options_get_tab() in wp-content/plugins/data-track/inc/admin/options.php:151
    Stack trace:
    #0 wp-content/plugins/data-track/inc/admin/options.php(162): wpdt_options_page_tab_nav()
    #1 wp-includes/class-wp-hook.php(310): wpdt_options_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown
    • > GET request to /wp-admin/post-new.php?post_type=wpdt_data
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for wp-data-track/v1/metaboxes is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
    • > GET request to /wp-admin/post-new.php?post_type=wpdt_data
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for wp-data-track/v1/remove-field is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)

SRP 50% 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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_rest_url() in wp-content/plugins/data-track/inc/views/admin/options-existing-field.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/data-track/inc/views/admin/post-metabox-input.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/data-track/inc/views/post/chart-data.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/data-track/inc/views/admin/options-new-field.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpdt_data
    • > Javascript (severe) in unknown
    /wp-content/plugins/data-track//js/admin.js?ver=1.0.1 104:20 Uncaught SyntaxError: Unexpected token '?'

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in data-track/assets to your readme.txt
Please take inspiration from this readme.txt

data-track/wp-data-track.php 85% from 13 tests

The main file in "WP Data Track" v. 1.1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("data-track.php" instead of "wp-data-track.php")

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 plugin976 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP17142496833
JavaScript32592135
CSS2108

PHP code Passed 2 tests

An short overview of 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.21
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%
Functions46
▷ Named functions2963.04%
▷ Anonymous functions1736.96%
Constants15
▷ Global constants15100.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 are no PNG files in this plugin