84% click-to-clipboard

Code Review | Click to Clipboard

WordPress plugin Click to Clipboard scored84%from 54 tests.

About plugin

  • Plugin page: click-to-clipboard
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Oct 24, 2016
  • Latest release: Nov 25, 2016
  • Number of updates: 5
  • Update frequency: every 6.6 days
  • Top authors: stevenkellow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.33ms] Passed 4 tests

Server-side resources used by Click to Clipboard
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.63 ▲0.29
Dashboard /wp-admin3.31 ▲0.0045.19 ▼1.99
Posts /wp-admin/edit.php3.36 ▲0.0044.89 ▼0.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.68 ▲15.85
Media Library /wp-admin/upload.php3.23 ▲0.0034.42 ▲3.69

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

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

Browser metrics Passed 4 tests

Click to Clipboard: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.361.72 ▼0.1643.61 ▼0.51
Dashboard /wp-admin2,209 ▲215.80 ▼0.0995.04 ▼20.0842.14 ▼3.05
Posts /wp-admin/edit.php2,092 ▲61.98 ▼0.0143.09 ▲3.5138.92 ▲2.32
Add New Post /wp-admin/post-new.php1,542 ▼018.63 ▲0.27600.84 ▼20.8055.72 ▲4.71
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.0798.64 ▼1.1143.47 ▲0.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-clipboard/click-to-clipboard.php:13

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: hover, click, copy, clipboard

click-to-clipboard/click-to-clipboard.php Passed 13 tests

The main file in "Click to Clipboard" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
81 characters long description:
A simple script to allow you to click on a paragraph to copy it to your clipboard

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected70 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1232339
Markdown110022
PHP13108
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/copied.png1.78KB1.09KB▼ 39.01%
img/click-to-copy.png3.97KB2.10KB▼ 47.25%