10% skimlinks

Code Review | Skimlinks Affiliate Marketing Tool

WordPress plugin Skimlinks Affiliate Marketing Tool scored 10% from 54 tests.

About plugin

  • Plugin page: skimlinks
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.1-4.9
  • WordPress version: 6.3.1
  • First release: May 5, 2010
  • Latest release: Dec 8, 2017
  • Number of updates: 46
  • Update frequency: every 60.5 days
  • Top authors: Skimlinks (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 53,984 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/skimlinks/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; sl_disclosure_widget has a deprecated constructor

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.48ms] Passed 4 tests

Analyzing server-side resources used by Skimlinks Affiliate Marketing Tool
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0256.09 ▲6.95
Dashboard /wp-admin3.33 ▲0.0262.00 ▲6.98
Posts /wp-admin/edit.php3.38 ▲0.0253.73 ▲0.20
Add New Post /wp-admin/post-new.php5.91 ▲0.02114.28 ▼9.24
Media Library /wp-admin/upload.php3.25 ▲0.0238.01 ▼7.83
Skimlinks /wp-admin/options-general.php?page=skimlinks-options3.3085.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Skimlinks Affiliate Marketing Tool
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7714.42 ▲0.771.85 ▼28.49116.67 ▲10.64
Dashboard /wp-admin2,210 ▲65.79 ▲0.86186.30 ▼36.47116.58 ▲9.37
Posts /wp-admin/edit.php2,102 ▲132.01 ▼0.0268.50 ▼20.11243.60 ▼33.34
Add New Post /wp-admin/post-new.php1,527 ▲9918.70 ▼3.851,249.07 ▲356.81302.01 ▲145.27
Media Library /wp-admin/upload.php1,398 ▲134.18 ▼0.02174.57 ▼26.16232.19 ▲79.10
Skimlinks /wp-admin/options-general.php?page=skimlinks-options9482.2457.30120.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • db_upgraded
    • sl_footer_js_works_for
    • widget_theysaidso_widget
    • sl_db_version
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=skimlinks-options
    • > User deprecated in wp-includes/functions.php+5453
    Function get_current_theme is deprecated since version 3.4.0! Use wp_get_theme() instead.

SRP 50% 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 take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/skimlinks/plugin.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/skimlinks/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/skimlinks/hooks.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/skimlinks/plugin.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/skimlinks/widget.php: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 on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (The Skimlinks settings page), #2 (Skimlinks publisher dashboard)
You can take inspiration from this readme.txt

skimlinks/plugin.php 85% from 13 tests

The main PHP file in "Skimlinks Affiliate Marketing Tool" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 303 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("skimlinks.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected604 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5149193588
JavaScript13016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.34MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Disclosure_cyan.png4.79KB2.58KB▼ 46.11%
screenshot-1.png143.77KB38.41KB▼ 73.29%
assets/skimlinks-logo.png19.78KB3.99KB▼ 79.82%
assets/Disclosure_blue.png4.88KB2.58KB▼ 47.05%
assets/Disclosure_white.png5.37KB2.56KB▼ 52.32%