10% track-connect

Code Review | TRACK Connect

WordPress plugin TRACK Connect scored10%from 54 tests.

About plugin

  • Plugin page: track-connect
  • Plugin version: 4.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.0.3
  • WordPress version: 6.3.1
  • First release: Jul 28, 2015
  • Latest release: Jan 15, 2019
  • Number of updates: 87
  • Update frequency: every 14.6 days
  • Top authors: trackhs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /43,169 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/track-connect/includes/class-listings.php+128
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.47MB] [CPU: ▲10.44ms] Passed 4 tests

An overview of server-side resources used by TRACK Connect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4854.69 ▲11.94
Dashboard /wp-admin3.81 ▲0.5058.06 ▲10.96
Posts /wp-admin/edit.php3.87 ▲0.5159.35 ▲12.81
Add New Post /wp-admin/post-new.php6.33 ▲0.44106.20 ▲6.04
Media Library /wp-admin/upload.php3.67 ▲0.4449.75 ▲16.36
Locations /wp-admin/edit-tags.php?taxonomy=locations&post_type=listing3.6645.44
Register Taxonomies /wp-admin/edit.php?post_type=listing&page=register-taxonomies3.6640.73
Property Types /wp-admin/edit-tags.php?taxonomy=property-types&post_type=listing3.6845.30
TRACK Connect /wp-admin/edit.php?post_type=listing3.7246.35
Status /wp-admin/edit-tags.php?taxonomy=status&post_type=listing3.6848.42
Features /wp-admin/edit-tags.php?taxonomy=features&post_type=listing3.6644.37
Add New /wp-admin/post-new.php?post_type=listing3.8763.38
Reorder Taxonomies /wp-admin/edit.php?post_type=listing&page=reorder-taxonomies3.6444.39
Settings /wp-admin/edit.php?post_type=listing&page=wp-listings-settings3.6742.89

Server storage [IO: ▲0.90MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/track-connect/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/trackconnect/views/.empty
Filesystem: 85 new files
Database: 2 new tables, 13 new options
New tables
wp_track_node_types
wp_track_amenities
New WordPress options
plugin_wp_listings_settings
status_children
track_db_version
widget_theysaidso_widget
widget_listings-search
property-types_children
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by TRACK Connect
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲33014.67 ▲0.2116.84 ▲14.6462.81 ▲11.98
Dashboard /wp-admin2,258 ▲705.85 ▲0.94106.93 ▼3.5542.44 ▼2.21
Posts /wp-admin/edit.php2,148 ▲592.11 ▲0.0838.80 ▼1.5138.08 ▲0.55
Add New Post /wp-admin/post-new.php1,591 ▲7718.06 ▲0.61604.86 ▼34.0968.28 ▲11.95
Media Library /wp-admin/upload.php1,446 ▲554.27 ▲0.1699.81 ▼5.0642.94 ▼2.05
Locations /wp-admin/edit-tags.php?taxonomy=locations&post_type=listing1,3212.2928.6029.07
Register Taxonomies /wp-admin/edit.php?post_type=listing&page=register-taxonomies1,0131.8424.0734.88
Property Types /wp-admin/edit-tags.php?taxonomy=property-types&post_type=listing1,5882.2929.6928.83
TRACK Connect /wp-admin/edit.php?post_type=listing1,1172.0432.4627.67
Status /wp-admin/edit-tags.php?taxonomy=status&post_type=listing1,7472.2826.9734.08
Features /wp-admin/edit-tags.php?taxonomy=features&post_type=listing1,2962.3427.0426.67
Add New /wp-admin/post-new.php?post_type=listing3,2577.88175.6271.72
Reorder Taxonomies /wp-admin/edit.php?post_type=listing&page=reorder-taxonomies8421.8427.9224.10
Settings /wp-admin/edit.php?post_type=listing&page=wp-listings-settings1,0211.9028.7038.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_track_amenities
    • wp_track_node_types
  • This plugin does not fully uninstall, leaving 13 options in the database
    • wp_listings_taxonomies
    • status_children
    • widget_listings-search
    • widget_wplistings-featured-listings
    • theysaidso_admin_options
    • plugin_wp_listings_settings
    • property-types_children
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • ...

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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=listing&page=register-taxonomies
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=listing&page=register-taxonomies
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/post-new.php?post_type=listing
    • > Notice in wp-content/plugins/track-connect/includes/views/listing-details-metabox.php+36
    Undefined index: wp_listings_complex_node
    • > GET request to /wp-admin/edit.php?post_type=listing&page=wp-listings-settings
    • > Notice in wp-content/plugins/track-connect/includes/views/wp-listings-settings.php+88
    Undefined index: wp_listings_force_sidebar

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/track-connect/includes/views/override/archive-listing/style.php
  • 32× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/track-connect/includes/views/override/archive-listing/body.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/track-connect/includes/views/create-tax.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/track-connect/includes/views/override/archive-listing/body.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_image_size() in wp-content/plugins/track-connect/includes/functions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_stylesheet_directory() in wp-content/plugins/track-connect/includes/helpers.php:187
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/track-connect/includes/views/search-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/track-connect/includes/views/wp-listings-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/track-connect/includes/views/featured-listings-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/track-connect/plugin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/track-connect/includes/views/listing-details-metabox.php:2

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 96% 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
4 plugin tags: trackpm, track sync, track, track hs

track-connect/plugin.php 92% from 13 tests

The main PHP script in "TRACK Connect" version 4.0.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("track-connect.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected10,559 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP349474913,981
JavaScript123352743,347
CSS143473152,212
Sass318001,008
SVG1019
JSON1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity45.00
▷ Minimum class complexity11.00
▷ Maximum class complexity192.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods65
▷ Static methods11.54%
▷ Public methods6193.85%
▷ Protected methods34.62%
▷ Private methods11.54%
Functions42
▷ Named functions4095.24%
▷ Anonymous functions24.76%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) includes/images/grab.png0.10KB0.00KB▼ 100.00%
includes/css/skins/minimal-white/rs-minimal-white.png5.33KB2.51KB▼ 52.97%
includes/css/skins/universal/rs-universal.png5.50KB2.83KB▼ 48.52%
includes/css/skins/default/rs-default.png3.09KB1.48KB▼ 52.03%
includes/css/skins/default-inverted/rs-default-inverted.png2.76KB1.34KB▼ 51.47%