10% tackthis

Code Review | TackThis

WordPress plugin TackThis scored10%from 54 tests.

About plugin

  • Plugin page: tackthis
  • Plugin version: 1.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 16, 2013
  • Latest release: Sep 15, 2014
  • Number of updates: 47
  • Update frequency: every 11.9 days
  • Top authors: Paywhere (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,746 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/tackthis/tackthis.php+242
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.26ms] Passed 4 tests

A check of server-side resources used by TackThis
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.58 ▼36.43
Dashboard /wp-admin2.05 ▼1.266.81 ▼42.39
Posts /wp-admin/edit.php2.05 ▼1.316.84 ▼40.17
Add New Post /wp-admin/post-new.php2.05 ▼3.846.13 ▼82.03
Media Library /wp-admin/upload.php2.05 ▼1.185.52 ▼29.01
Shortcodes /wp-admin/admin.php?page=wptackthis_shortcodes2.054.93
Dashboard /wp-admin/admin.php?page=wptackthis_dashboard2.056.07

Server storage [IO: ▲2.49MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/tackthis/" and "wp-content/uploads/"
    • (new file) wp-content/cache/tackthis/.empty
Filesystem: 44 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
widget_tackthiscartalonewidget
db_upgraded
can_compress_scripts
widget_tackthiscartwidget
widget_tackthissearchwidget
widget_recent-comments
widget_recent-posts
wptackthis_options
theysaidso_admin_options

Browser metrics Passed 4 tests

TackThis: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲5713.63 ▼1.121.88 ▼0.1043.43 ▼1.58
Dashboard /wp-admin2,220 ▲325.04 ▲0.13100.04 ▼10.5682.19 ▲36.93
Posts /wp-admin/edit.php2,118 ▲292.00 ▼0.1240.68 ▲5.4732.50 ▼3.80
Add New Post /wp-admin/post-new.php1,699 ▲16224.47 ▲1.19733.92 ▲125.2762.23 ▲4.26
Media Library /wp-admin/upload.php1,405 ▲174.15 ▼0.07109.26 ▲11.9481.99 ▲40.60
Shortcodes /wp-admin/admin.php?page=wptackthis_shortcodes8122.0126.1525.37
Dashboard /wp-admin/admin.php?page=wptackthis_dashboard1,0392.0322.6845.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/tackthis/tackthis.php+78
    Undefined index: api_mode
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_tackthiscartalonewidget
    • widget_tackthissearchwidget
    • wptackthis_options
    • widget_recent-comments
    • widget_tackthiscartwidget
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptackthis_dashboard
    • > Notice in wp-content/plugins/tackthis/admin/pages/dashboard.php+123
    Undefined index: api_mode
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptackthis_dashboard
    • > Deprecated in wp-content/plugins/tackthis/tackthis.php+248
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptackthis_dashboard
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in tackThisSearchWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptackthis_dashboard
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in tackThisCartWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptackthis_dashboard
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in tackThisCartAloneWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptackthis_dashboard
    • > Notice in wp-content/plugins/tackthis/admin/pages/dashboard.php+26
    Undefined index: shopId

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
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/tackthis/admin/pages/dashboard.php:16
    • > PHP Warning
      Use of undefined constant CART_DOMAIN - assumed 'CART_DOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/tackthis/trunk/admin/pages/dashboard.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tackthis/search.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tackthis/cart-alone.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/tackthis/admin/pages/shortcodes.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tackthis/cart.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/tackthis/trunk/admin/pages/dashboard.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tackthis/trunk/search.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tackthis/trunk/cart-alone.php:10
    • > PHP Warning
      Use of undefined constant CART_DOMAIN - assumed 'CART_DOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/tackthis/admin/pages/dashboard.php on line 4

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 uses markdown syntax to describe your plugin to the world
8 plugin tags: facebook shop, smoovpay, paypal, e-commerce, alipay...

tackthis/tackthis.php 92% from 13 tests

The primary PHP file in "TackThis" version 1.3.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 179 characters long)

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 plugin1,282 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP102443731,229
JavaScript171853

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.67
▷ Minimum class complexity4.00
▷ Maximum class complexity46.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods68
▷ Static methods00.00%
▷ Public methods68100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants52
▷ Global constants52100.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
18 PNG files occupy 2.35MB with 1.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
svn/assets/screenshot-5.png504.47KB186.13KB▼ 63.10%
trunk/assets/images/tackthis-icon-grey.png1.54KB0.96KB▼ 37.95%
svn/assets/screenshot-1.png71.60KB29.00KB▼ 59.50%
trunk/assets/images/tackthis-16x16.png1.54KB0.96KB▼ 37.95%
trunk/svn/assets/screenshot-6.png180.37KB53.09KB▼ 70.57%