62% clickwhale

Code Review | ClickWhale - Link Shortener, Click Tracker & Link Pages

WordPress plugin ClickWhale - Link Shortener, Click Tracker & Link Pages scored62%from 54 tests.

About plugin

  • Plugin page: clickwhale
  • Plugin version: 1.5.3
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 11, 2022
  • Latest release: Nov 1, 2023
  • Number of updates: 22
  • Update frequency: every 21.7 days
  • Top authors: flowdee (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /2,688 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.33MB] [CPU: ▲3.04ms] Passed 4 tests

This is a short check of server-side resources used by ClickWhale - Link Shortener, Click Tracker & Link Pages
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.78 ▲1.3145.38 ▲6.24
Dashboard /wp-admin4.64 ▲1.3453.85 ▲2.63
Posts /wp-admin/edit.php4.69 ▲1.3364.30 ▲17.05
Add New Post /wp-admin/post-new.php7.22 ▲1.3393.25 ▼6.00
Media Library /wp-admin/upload.php4.57 ▲1.3344.90 ▲9.29
Add New Tracking Code /wp-admin/admin.php?page=clickwhale-edit-tracking-code4.5945.71
Add New /wp-admin/admin.php?page=clickwhale-edit-link4.5443.77
Tracking Codes /wp-admin/admin.php?page=clickwhale-tracking-codes4.4838.79
Add New Link Page /wp-admin/admin.php?page=clickwhale-edit-linkpage4.8049.33
Upgrade to PRO /wp-admin/admin.php?page=clickwhale-pro4.4745.53
Tools /wp-admin/admin.php?page=clickwhale-tools4.5239.06
Links /wp-admin/admin.php?page=clickwhale4.4842.69
Add New Category /wp-admin/admin.php?page=clickwhale-edit-category4.5141.87
Settings /wp-admin/admin.php?page=clickwhale-settings4.4739.97
Categories /wp-admin/admin.php?page=clickwhale-categories4.4840.94

Server storage [IO: ▲3.44MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 1,471 new files
Database: 7 new tables, 15 new options
New tables
wp_clickwhale_categories
wp_clickwhale_track
wp_clickwhale_meta
wp_clickwhale_tracking_codes
wp_clickwhale_visitors
wp_clickwhale_links
wp_clickwhale_linkpages
New WordPress options
clickwhale_hide_notice_deactive
theysaidso_admin_options
clickwhale_other_options
clickwhale_version
can_compress_scripts
clickwhale_hide_notice_migrate
widget_recent-comments
db_upgraded
clickwhale_linkpages_options
widget_recent-posts
...

Browser metrics Passed 4 tests

ClickWhale - Link Shortener, Click Tracker & Link Pages: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲16914.35 ▼0.001.80 ▲0.0831.90 ▼13.61
Dashboard /wp-admin2,287 ▲1105.63 ▼0.0493.98 ▲4.3772.92 ▲31.95
Posts /wp-admin/edit.php2,207 ▲1072.03 ▲0.0238.85 ▲4.1235.32 ▲3.96
Add New Post /wp-admin/post-new.php1,625 ▲9723.21 ▲0.30723.68 ▲12.1653.07 ▲2.44
Media Library /wp-admin/upload.php1,501 ▲1014.22 ▲0.07107.81 ▲4.4574.84 ▲31.77
Add New Tracking Code /wp-admin/admin.php?page=clickwhale-edit-tracking-code1,8825.19112.2848.99
Add New /wp-admin/admin.php?page=clickwhale-edit-link2,3182.0829.5537.87
Tracking Codes /wp-admin/admin.php?page=clickwhale-tracking-codes1,1892.0327.8032.17
Add New Link Page /wp-admin/admin.php?page=clickwhale-edit-linkpage17,4897.33232.9491.89
Upgrade to PRO /wp-admin/admin.php?page=clickwhale-pro1,2961.9924.2868.13
Tools /wp-admin/admin.php?page=clickwhale-tools9852.0626.9629.05
Links /wp-admin/admin.php?page=clickwhale1,2022.0426.9334.38
Add New Category /wp-admin/admin.php?page=clickwhale-edit-category1,0682.0728.1833.76
Settings /wp-admin/admin.php?page=clickwhale-settings1,0812.0529.1338.16
Categories /wp-admin/admin.php?page=clickwhale-categories1,1052.0328.0331.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 7 tables
    • wp_clickwhale_meta
    • wp_clickwhale_linkpages
    • wp_clickwhale_track
    • wp_clickwhale_visitors
    • wp_clickwhale_tracking_codes
    • wp_clickwhale_categories
    • wp_clickwhale_links
  • Zombie WordPress options were found after uninstall: 14 options
    • clickwhale_hide_notice_deactive
    • widget_recent-posts
    • clickwhale_hide_notice_migrate
    • clickwhale_tracking_codes_options
    • db_upgraded
    • clickwhale_tools_migration_options
    • can_compress_scripts
    • theysaidso_admin_options
    • clickwhale_general_options
    • widget_recent-comments
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clickwhale-edit-category
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/clickwhale/public/partials/clickwhale-public-display.php
  • 24× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/clickwhale/admin/views/categories/category-edit.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/clickwhale/admin/views/settings/pro.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Clickwhale_Link_Edit' not found in wp-content/plugins/clickwhale/admin/views/links/link-edit.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/clickwhale/admin/controllers/linkpages/class-clickwhale-linkpages-list-table.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/clickwhale/admin/views/categories/categories-list-table.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/clickwhale/admin/controllers/categories/class-clickwhale-categories-list-table.php:7
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/clickwhale/admin/views/categories/categories-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Clickwhale_Migration' not found in wp-content/plugins/clickwhale/admin/views/tools/tools.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'ClickwhaleLinkPageInterface' not found in wp-content/plugins/clickwhale/public/linkpages/ClickwhaleLinkPage.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Clickwhale_links_List_Table' not found in wp-content/plugins/clickwhale/admin/views/links/links-list-table.php:5

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: links, link tracker, link shortener, link pages, affiliate links

clickwhale/clickwhale.php Passed 13 tests

The primary PHP file in "ClickWhale - Link Shortener, Click Tracker & Link Pages" version 1.5.3 is used by WordPress to initiate all plugin functionality
69 characters long description:
Best Link Shortener, Click Tracker & Link Pages Plugin for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin22,489 lines of code in 1,396 files:
LanguageFilesBlank linesComment linesLines of code
PHP752,3041,88511,277
JSON1004,823
SVG1,302123,804
CSS3390202,084
JavaScript1443177485
YAML10016

PHP code Passed 2 tests

Analyzing 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.39
Average class complexity19.73
▷ Minimum class complexity1.00
▷ Maximum class complexity311.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes56
▷ Abstract classes00.00%
▷ Concrete classes56100.00%
▷ Final classes00.00%
Methods483
▷ Static methods7415.32%
▷ Public methods39180.95%
▷ Protected methods00.00%
▷ Private methods9219.05%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 1.25MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-772x250.png33.19KB18.61KB▼ 43.93%
.wordpress-org/screenshot-1.png35.79KB18.26KB▼ 48.99%
.wordpress-org/icon-256x256.png8.29KB5.49KB▼ 33.81%
.wordpress-org/screenshot-4.png17.23KB19.52KB0.00%
.wordpress-org/screenshot-2.png122.12KB54.87KB▼ 55.07%