10% anytrack-affiliate-link-manager

Code Review | AnyTrack Affiliate Link Manager

WordPress plugin AnyTrack Affiliate Link Manager scored10%from 54 tests.

About plugin

  • Plugin page: anytrack-affiliat...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 22, 2020
  • Latest release: Jun 18, 2023
  • Number of updates: 10
  • Update frequency: every 90.8 days
  • Top authors: anytrack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,971 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.83MB] [CPU: ▼57.29ms] Passed 4 tests

A check of server-side resources used by AnyTrack Affiliate Link Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.317.04 ▼38.93
Dashboard /wp-admin2.17 ▼1.138.38 ▼43.85
Posts /wp-admin/edit.php2.18 ▼1.187.62 ▼47.20
Add New Post /wp-admin/post-new.php2.17 ▼3.718.87 ▼99.17
Media Library /wp-admin/upload.php2.18 ▼1.057.18 ▼32.50
Property Settings /wp-admin/edit.php?post_type=custom_redirect&page=aalmredirects_seetings2.189.68
Affiliate Links Manager /wp-admin/edit.php?post_type=custom_redirect2.188.26
Add New /wp-admin/post-new.php?post_type=custom_redirect2.1810.05

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for AnyTrack Affiliate Link Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,418 ▲65716.51 ▲2.1414.51 ▲12.8140.40 ▼6.01
Dashboard /wp-admin2,379 ▲2026.19 ▲0.5696.86 ▲5.0836.86 ▼9.94
Posts /wp-admin/edit.php2,378 ▲2783.36 ▲1.3545.24 ▲6.1330.90 ▼4.78
Add New Post /wp-admin/post-new.php1,556 ▲2822.95 ▼0.07575.61 ▼60.7235.59 ▼12.61
Media Library /wp-admin/upload.php1,445 ▲454.06 ▼0.1283.28 ▼22.0440.93 ▼3.78
Property Settings /wp-admin/edit.php?post_type=custom_redirect&page=aalmredirects_seetings1,1832.9839.7226.83
Affiliate Links Manager /wp-admin/edit.php?post_type=custom_redirect1,4073.2946.0229.93
Add New /wp-admin/post-new.php?post_type=custom_redirect1,7833.5461.2233.57

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
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=custom_redirect
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/post-new.php?post_type=custom_redirect
    • > Notice in wp-content/plugins/anytrack-affiliate-link-manager/modules/meta_box.php+62
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=custom_redirect
    • > Notice in wp-content/plugins/anytrack-affiliate-link-manager/modules/meta_box.php+76
    Undefined index: source_url
    • > GET request to /wp-admin/post-new.php?post_type=custom_redirect
    • > Notice in wp-content/plugins/anytrack-affiliate-link-manager/modules/meta_box.php+76
    Undefined index: target_url

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/anytrack-affiliate-link-manager/anytrack-affiliate-link-manager.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/anytrack-affiliate-link-manager/modules/hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/anytrack-affiliate-link-manager/modules/meta_box.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/anytrack-affiliate-link-manager/modules/cpt.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/anytrack-affiliate-link-manager/modules/settings.php:145
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anytrack-affiliate-link-manager/modules/ajax.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/anytrack-affiliate-link-manager/modules/scripts.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: affiliate link management, cj affiliates, anytrack, redirection, partnerize...

anytrack-affiliate-link-manager/anytrack-affiliate-link-manager.php Passed 13 tests

The principal PHP file in "AnyTrack Affiliate Link Manager" v. 1.0.3 is loaded by WordPress automatically on each request
83 characters long description:
Generate safe and nicer offer links with built-in support for the AnyTrack tracker.

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
Everything looks great! No dangerous files found in this plugin9,370 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS2578,196
PHP931861972
PO File1347720107
JavaScript242895

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity13.14
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions750.00%
▷ Anonymous functions750.00%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/css/glyphicons-halflings-white.png7.38KB8.01KB0.00%
modules/inc/assets/css/glyphicons-halflings.png9.02KB9.70KB0.00%