83% cuelinks

Code Review | Cuelinks - Affiliate Marketing Tool for Publishers

WordPress plugin Cuelinks - Affiliate Marketing Tool for Publishers scored83%from 54 tests.

About plugin

  • Plugin page: cuelinks
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.4
  • WordPress version: 6.3.1
  • First release: Nov 23, 2016
  • Latest release: May 13, 2020
  • Number of updates: 18
  • Update frequency: every 70.4 days
  • Top authors: cuelinks1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /11,854 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.28ms] Passed 4 tests

This is a short check of server-side resources used by Cuelinks - Affiliate Marketing Tool for Publishers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.38 ▲3.40
Dashboard /wp-admin3.32 ▲0.0243.72 ▼2.08
Posts /wp-admin/edit.php3.37 ▲0.0145.12 ▼2.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.66 ▼9.07
Media Library /wp-admin/upload.php3.24 ▲0.0133.16 ▲0.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_cuelinks_cuelinkwidget
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Cuelinks - Affiliate Marketing Tool for Publishers: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲4913.68 ▼0.622.68 ▲0.8741.67 ▲3.73
Dashboard /wp-admin2,221 ▲325.80 ▼0.1499.31 ▼7.4743.03 ▼1.83
Posts /wp-admin/edit.php2,101 ▲92.06 ▲0.0740.08 ▼0.9334.95 ▼0.98
Add New Post /wp-admin/post-new.php1,557 ▲2418.29 ▼4.44607.03 ▼30.3962.59 ▲1.14
Media Library /wp-admin/upload.php1,400 ▲124.20 ▼0.1193.78 ▼15.5241.87 ▼3.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_cuelinks_cuelinkwidget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cuelinks/index.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 20 tag instead of maximum 10
The official readme.txt is a good inspiration

cuelinks/index.php 85% from 13 tests

The main PHP script in "Cuelinks - Affiliate Marketing Tool for Publishers" version 1.0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cuelinks.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 323 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin154 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22736154

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.33
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/cuelinks-logo.png3.00KB1.28KB▼ 57.44%