89% tracking-for-ups

Code Review | Tracking for UPS

WordPress plugin Tracking for UPS scored 89% from 54 tests.

About plugin

  • Plugin page: tracking-for-ups
  • Plugin version: 1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 7, 2021
  • Latest release: Jan 7, 2021
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: w03d (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 430 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.79ms] Passed 4 tests

A check of server-side resources used by Tracking for UPS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.17 ▼3.92
Dashboard /wp-admin3.35 ▲0.0446.43 ▼5.34
Posts /wp-admin/edit.php3.40 ▲0.0450.11 ▲5.33
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.62 ▲0.89
Media Library /wp-admin/upload.php3.27 ▲0.0433.32 ▲1.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 66 new files
Database: no new tables, 9 new options
New WordPress options
tracking-for-ups-general
tracking-for-ups-example
tracking-for-ups-configuration
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Tracking for UPS: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲18913.51 ▼0.937.81 ▲5.9243.56 ▼5.98
Dashboard /wp-admin2,222 ▲314.85 ▼0.09109.53 ▲7.2543.66 ▲4.61
Posts /wp-admin/edit.php2,105 ▲161.97 ▼0.0940.43 ▲1.2934.82 ▲0.19
Add New Post /wp-admin/post-new.php1,528 ▲1423.40 ▲5.76592.50 ▼49.0450.99 ▼2.83
Media Library /wp-admin/upload.php1,407 ▲224.17 ▼0.0795.74 ▼4.6341.21 ▼0.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • tracking-for-ups-example
    • widget_recent-posts
    • theysaidso_admin_options
    • tracking-for-ups-configuration
    • widget_theysaidso_widget
    • tracking-for-ups-general
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% 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: wordpress, tracking, plugin, ups

tracking-for-ups/ups-tracking.php 77% from 13 tests

The primary PHP file in "Tracking for UPS" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tracking-for-ups.php" instead of "ups-tracking.php")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/Languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin3,043 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP305049751,734
JSON14001,229
PO File1151849
Markdown119022
JavaScript34589
CSS2080

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.33
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes1562.50%
Methods161
▷ Static methods4226.09%
▷ Public methods11873.29%
▷ Protected methods00.00%
▷ Private methods4326.71%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin