84% append-link-on-copy

Code Review | Append Link on Copy

WordPress plugin Append Link on Copy scored84%from 54 tests.

About plugin

  • Plugin page: append-link-on-copy
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.8
  • WordPress version: 6.3.1
  • First release: Jan 25, 2013
  • Latest release: Jan 16, 2015
  • Number of updates: 16
  • Update frequency: every 107.7 days
  • Top authors: JonathanMH_com (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /14,087 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.47ms] Passed 4 tests

Analyzing server-side resources used by Append Link on Copy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.27 ▼2.36
Dashboard /wp-admin3.35 ▲0.0547.09 ▲1.75
Posts /wp-admin/edit.php3.40 ▲0.0550.64 ▼2.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.33 ▼6.95
Media Library /wp-admin/upload.php3.27 ▲0.0537.22 ▲2.36
Append Link on Copy /wp-admin/options-general.php?page=append_link_on_copy_options3.2432.12

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Append Link on Copy
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.26 ▼1.121.72 ▲0.0241.22 ▼5.14
Dashboard /wp-admin2,213 ▲284.86 ▼1.00110.87 ▲8.8541.51 ▼4.02
Posts /wp-admin/edit.php2,101 ▲121.99 ▼0.0039.67 ▼0.0436.57 ▼0.25
Add New Post /wp-admin/post-new.php1,545 ▲818.67 ▼4.39604.67 ▼69.6261.28 ▲3.29
Media Library /wp-admin/upload.php1,395 ▲104.29 ▲0.1098.75 ▼0.3142.10 ▼1.13
Append Link on Copy /wp-admin/options-general.php?page=append_link_on_copy_options8922.0324.2729.87

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/append-link-on-copy/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/append-link-on-copy/index.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: add text to copy and paste, copy paste, copyright, js, javscript...

append-link-on-copy/index.php 92% from 13 tests

"Append Link on Copy" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("append-link-on-copy.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin268 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24819227
JavaScript110140
Markdown1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin