78% shorturl-tracker

Code Review | ShortUrl Tracker

WordPress plugin ShortUrl Tracker scored78%from 54 tests.

About plugin

  • Plugin page: shorturl-tracker
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 21, 2023
  • Latest release: Jan 21, 2023
  • Number of updates: 3
  • Update frequency: every 5.0 days
  • Top authors: buildyourweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /127 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼1.08ms] Passed 4 tests

Analyzing server-side resources used by ShortUrl Tracker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.3260.52 ▲18.72
Dashboard /wp-admin3.89 ▲0.2669.68 ▲2.22
Posts /wp-admin/edit.php3.94 ▲0.2656.16 ▲4.91
Add New Post /wp-admin/post-new.php6.41 ▲0.2792.74 ▼19.54
Media Library /wp-admin/upload.php3.75 ▲0.2645.10 ▲8.10
Dashboard /wp-admin/admin.php?page=sut-home3.8245.72
Settings /wp-admin/admin.php?page=sut-settings3.7844.91
All Campaigns /wp-admin/admin.php?page=sut-get-campaign3.8235.72
Create Shortlink /wp-admin/admin.php?page=sut-create-link3.7844.71
All Shortlinks /wp-admin/admin.php?page=sut-historic3.8342.59
Create Campaign /wp-admin/admin.php?page=sut-create-campaign3.7639.21

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 38 new files
Database: 1 new table, 7 new options
New tables
wp_shorturl_tracker
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
recovery_mode_email_last_sent
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for ShortUrl Tracker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.30 ▼0.081.98 ▲0.2245.75 ▲6.95
Dashboard /wp-admin2,234 ▲545.61 ▼0.0993.63 ▲5.5641.90 ▼1.72
Posts /wp-admin/edit.php2,139 ▲362.01 ▲0.0336.23 ▼8.6633.55 ▼7.43
Add New Post /wp-admin/post-new.php1,581 ▲3523.26 ▲0.08671.26 ▲43.3658.00 ▲5.90
Media Library /wp-admin/upload.php1,439 ▲424.17 ▲0.0297.66 ▼4.0847.15 ▼0.05
Dashboard /wp-admin/admin.php?page=sut-home8362.0126.6144.33
Settings /wp-admin/admin.php?page=sut-settings8912.0223.0832.66
All Campaigns /wp-admin/admin.php?page=sut-get-campaign7241.146.5816.87
Create Shortlink /wp-admin/admin.php?page=sut-create-link8332.0424.7329.30
All Shortlinks /wp-admin/admin.php?page=sut-historic8472.0123.8129.50
Create Campaign /wp-admin/admin.php?page=sut-create-campaign7241.536.8517.22

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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sut-create-campaign
    • > Parse error in wp-content/plugins/shorturl-tracker/class/Sut_Byw_Campaign.php+22
    syntax error, unexpected '|', expecting ';' or '{'

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/shorturl-tracker/class/Sut_Byw_Campaign.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/shorturl-tracker/create_campaign.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/shorturl-tracker/link-admin.php:2
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/shorturl-tracker/class/Sut_Byw_Campaign.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
No tags were found

shorturl-tracker/shorturl-tracker.php 92% from 13 tests

"ShortUrl Tracker" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected4,977 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP131231852,071
CSS21521,883
JavaScript82819575
PO File2185216448

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.80
▷ Minimum class complexity4.00
▷ Maximum class complexity75.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods57100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo-shorturl-tracker.png16.08KB7.24KB▼ 54.99%
img/unlock.png0.27KB0.20KB▼ 27.14%
img/search-icon-black.png1.74KB2.35KB0.00%
img/search-icon.png4.90KB2.35KB▼ 51.99%
img/trash.png0.27KB0.20KB▼ 24.28%