10% copy-link

Code Review | CopyLink

WordPress plugin CopyLink scored10%from 54 tests.

About plugin

  • Plugin page: copy-link
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2011
  • Latest release: May 11, 2015
  • Number of updates: 47
  • Update frequency: every 29.7 days
  • Top authors: Dejan SEO (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /16,661 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/copy-link/wp-copy.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WPCopy has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼55.57ms] Passed 4 tests

This is a short check of server-side resources used by CopyLink
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.377.07 ▼38.52
Dashboard /wp-admin2.11 ▼1.196.54 ▼43.21
Posts /wp-admin/edit.php2.11 ▼1.256.02 ▼43.53
Add New Post /wp-admin/post-new.php2.11 ▼3.786.68 ▼97.03
Media Library /wp-admin/upload.php2.11 ▼1.126.88 ▼31.19
Link copy /wp-admin/admin.php?page=copy-link/admin/copied.php2.116.08
Settings /wp-admin/admin.php?page=copy-link/admin/settings.php2.116.30

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 18 new files
Database: 1 new table, 7 new options
New tables
wp_wp_copy
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
wp-copy

Browser metrics Passed 4 tests

A check of browser resources used by CopyLink
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13713.65 ▼0.728.83 ▲6.7941.88 ▼4.34
Dashboard /wp-admin2,216 ▲365.58 ▼0.0985.65 ▼0.1440.52 ▼4.70
Posts /wp-admin/edit.php2,127 ▲271.97 ▼0.0235.23 ▼3.5234.60 ▼3.51
Add New Post /wp-admin/post-new.php1,633 ▲10723.44 ▼0.24614.43 ▼81.0049.49 ▼3.88
Media Library /wp-admin/upload.php1,427 ▲274.22 ▼0.0396.95 ▼16.7244.26 ▼6.89
Link copy /wp-admin/admin.php?page=copy-link/admin/copied.php7961.6923.4825.71
Settings /wp-admin/admin.php?page=copy-link/admin/settings.php8572.0425.4427.16

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/copy-link/wp-copy.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WPCopy has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=copy-link/admin/settings.php
    • > Deprecated in wp-content/plugins/copy-link/wp-copy.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; WPCopy has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=copy-link/admin/copied.php
    • > Notice in wp-content/plugins/copy-link/admin/copied.php+10
    Undefined index: my_action
    • > GET request to /wp-admin/admin.php?page=copy-link/admin/copied.php
    • > Notice in wp-content/plugins/copy-link/admin/copied.php+22
    Undefined index: page
    • > GET request to /wp-admin/admin.php?page=copy-link/admin/copied.php
    • > Notice in wp-content/plugins/copy-link/admin/copied.php+24
    Undefined index: order
    • > GET request to /wp-admin/admin.php?page=copy-link/admin/copied.php
    • > Notice in wp-content/plugins/copy-link/admin/copied.php+25
    Undefined index: order_column
    • > GET request to /wp-admin/admin.php?page=copy-link/admin/settings.php
    • > Notice in wp-content/plugins/copy-link/admin/settings.php+7
    Undefined variable: WPPagerank
    • > GET request to /wp-admin/admin.php?page=copy-link/admin/settings.php
    • > Notice in wp-content/plugins/copy-link/admin/settings.php+7
    Trying to get property 'plugin_domain' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/copy-link/wp-copy.php
    • > /wp-content/plugins/copy-link/wp-copy-ajax.php
    • > /wp-content/plugins/copy-link/includes/Browser.php
    • > /wp-content/plugins/copy-link/admin/copied.php
    • > /wp-content/plugins/copy-link/admin/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
8 plugin tags: automatic links, material referening, relevant traffic, citations, linking process...

copy-link/wp-copy.php 92% from 13 tests

The principal PHP file in "CopyLink" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("copy-link.php" instead of "wp-copy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,253 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6644281,083
JavaScript2620170

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.36
Average class complexity68.00
▷ Minimum class complexity18.00
▷ Maximum class complexity118.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods69
▷ Static methods00.00%
▷ Public methods3347.83%
▷ Protected methods3652.17%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants55
▷ Global constants00.00%
▷ Class constants55100.00%
▷ Public constants55100.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
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.27KB15.21KB▼ 56.87%
img/uparrow.png0.29KB0.19KB▼ 34.00%
img/downarrow.png0.29KB0.19KB▼ 35.25%