78% tapfiliate

Code Review | Tapfiliate

WordPress plugin Tapfiliate scored78%from 54 tests.

About plugin

  • Plugin page: tapfiliate
  • Plugin version: 3.0.17
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: May 28, 2018
  • Latest release: Aug 9, 2023
  • Number of updates: 79
  • Update frequency: every 24.5 days
  • Top authors: tapfiliate (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /14,681 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.64ms] Passed 4 tests

Server-side resources used by Tapfiliate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.29 ▼8.14
Dashboard /wp-admin3.40 ▲0.0653.95 ▼9.98
Posts /wp-admin/edit.php3.52 ▲0.1648.05 ▲5.90
Add New Post /wp-admin/post-new.php5.98 ▲0.1089.75 ▼4.44
Media Library /wp-admin/upload.php3.32 ▲0.1037.59 ▼0.01
Tapfiliate /wp-admin/options-general.php?page=tapfiliate3.3133.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 8 new options
New WordPress options
tap_account_id
db_upgraded
theysaidso_admin_options
tap_plugin_version
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Tapfiliate: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.39 ▼1.044.74 ▲3.0536.05 ▼7.37
Dashboard /wp-admin2,213 ▲225.86 ▲0.99101.91 ▼3.5442.17 ▲1.59
Posts /wp-admin/edit.php2,090 ▲12.02 ▲0.0335.77 ▼1.5133.46 ▲1.51
Add New Post /wp-admin/post-new.php1,536 ▼823.47 ▲5.31687.93 ▲65.7753.83 ▲5.38
Media Library /wp-admin/upload.php1,395 ▲74.26 ▲0.0198.33 ▼3.7344.90 ▼4.23
Tapfiliate /wp-admin/options-general.php?page=tapfiliate9122.0722.9232.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • tap_account_id
    • db_upgraded
    • can_compress_scripts
    • tap_plugin_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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/tapfiliate/tracking-snippet.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: integration in wp-content/plugins/tapfiliate/tracking-snippet.php on line 3
    • > PHP Notice
      Undefined variable: is_converting in wp-content/plugins/tapfiliate/tracking-snippet.php on line 7
    • > PHP Notice
      Undefined variable: tap_account_id in wp-content/plugins/tapfiliate/tracking-snippet.php on line 3

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Dashboard)
The official readme.txt might help

tapfiliate/tapfiliate.php Passed 13 tests

The main file in "Tapfiliate" v. 3.0.17 serves as a complement to information provided in readme.txt and as the entry point to the plugin
46 characters long description:
Easily integrate the Tapfiliate tracking code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin651 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1315594651

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions2793.10%
▷ Anonymous functions26.90%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 1.13MB with 0.80MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot.png1,037.25KB259.57KB▼ 74.98%
images/banner.png123.67KB41.28KB▼ 66.62%