10% gambling-affiliate-link-checker

Code Review | Simple Affiliate Link Checker

WordPress plugin Simple Affiliate Link Checker scored10%from 54 tests.

About plugin

  • Plugin page: gambling-affiliat...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 21, 2022
  • Latest release: Jun 26, 2023
  • Number of updates: 14
  • Update frequency: every 13.4 days
  • Top authors: digitalsolutionsmedia (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10+ active /1,710 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > User error in wp-content/plugins/gambling-affiliate-link-checker/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16.

Server metrics [RAM: ▼1.68MB] [CPU: ▼50.61ms] Passed 4 tests

Analyzing server-side resources used by Simple Affiliate Link Checker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.1611.48 ▼29.53
Dashboard /wp-admin2.32 ▼0.989.23 ▼43.73
Posts /wp-admin/edit.php2.32 ▼1.038.52 ▼38.45
Add New Post /wp-admin/post-new.php2.32 ▼3.567.38 ▼90.56
Media Library /wp-admin/upload.php2.32 ▼0.906.33 ▼29.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3,439 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Affiliate Link Checker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲14714.10 ▼0.275.00 ▲3.1638.05 ▼4.31
Dashboard /wp-admin2,225 ▲435.85 ▲0.9192.86 ▼10.8957.06 ▲16.00
Posts /wp-admin/edit.php2,109 ▲202.15 ▲0.0434.96 ▼0.4133.19 ▼1.87
Add New Post /wp-admin/post-new.php1,530 ▲1121.37 ▼1.75575.05 ▼79.1454.19 ▲1.17
Media Library /wp-admin/upload.php1,405 ▲174.23 ▲0.0396.17 ▼3.5643.31 ▼2.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > User error in wp-content/plugins/gambling-affiliate-link-checker/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16.
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • affiliate_link_checker_version
    • db_upgraded
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gambling-affiliate-link-checker/vendor/slack-php/slack-block-kit/bin/test-template.php
    • > /wp-content/plugins/gambling-affiliate-link-checker/vendor/slack-php/slack-block-kit/bin/gen-test.php
  • 1673× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Serializer\ormalizer\\DenormalizerInterface' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/jolicode/slack-php-api/generated/Normalizer/CallsParticipantsRemovePostResponse200Normalizer.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Reports\\Report' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/squizlabs/php_codesniffer/src/Reports/Info.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Exception\\RequestException' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/php-http/httplug/src/Exception/HttpException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Serializer\\Exception\\UnexpectedValueException' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/symfony/serializer/Exception/NotEncodableValueException.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'SlackPhp\\BlockKit\\Element' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/slack-php/slack-block-kit/src/Partials/Confirm.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Serializer\ormalizer\\DenormalizerInterface' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/jolicode/slack-php-api/generated/Normalizer/ChatScheduledMessagesListGetResponsedefaultNormalizer.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/gambling-affiliate-link-checker/vendor/guzzlehttp/psr7/src/InflateStream.php:20

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)
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #3 (Description of third screenshot named screenshot-3) image missing
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

gambling-affiliate-link-checker/affiliate-link-checker.php 69% from 13 tests

The principal PHP file in "Simple Affiliate Link Checker" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("gambling-affiliate-link-checker.php" instead of "affiliate-link-checker.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("//")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/gambling-affiliate-link-checker/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
      • wp-content/plugins/gambling-affiliate-link-checker/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
200,565 lines of code in 3,006 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,51642,69278,201172,812
Markdown592,73407,273
Pascal1303,2177,0906,548
JSON40005,766
XML1483696954,807
JavaScript627848892,247
CSS3418993665
XSD2200224
YAML123613183
HTML10030
DOS Batch241010

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 478)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity12.97
▷ Minimum class complexity1.00
▷ Maximum class complexity721.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity478.00
Code structure
Namespaces270
Interfaces104
Traits26
Classes2,193
▷ Abstract classes411.87%
▷ Concrete classes2,15298.13%
▷ Final classes1617.48%
Methods11,174
▷ Static methods4073.64%
▷ Public methods9,90388.63%
▷ Protected methods8487.59%
▷ Private methods4233.79%
Functions278
▷ Named functions9534.17%
▷ Anonymous functions18365.83%
Constants463
▷ Global constants11625.05%
▷ Class constants34774.95%
▷ Public constants26476.08%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/slack-php/slack-block-kit/block-kit-screenshot.png100.58KB43.13KB▼ 57.12%
vendor/jolicode/slack-php-api/docs/images/model-sample.png119.68KB24.45KB▼ 79.57%