83% copy-to-clipboard-mobile-web

Code Review | Copy To Clipboard - mobile + web

WordPress plugin Copy To Clipboard - mobile + web scored83%from 54 tests.

About plugin

  • Plugin page: copy-to-clipboard...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9.1
  • WordPress version: 6.3.1
  • First release: Mar 21, 2014
  • Latest release: Aug 15, 2014
  • Number of updates: 22
  • Update frequency: every 6.8 days
  • Top authors: singhalavi (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /7,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Copy To Clipboard - mobile + web
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.23 ▲1.46
Dashboard /wp-admin3.32 ▲0.0245.80 ▼1.04
Posts /wp-admin/edit.php3.37 ▲0.0144.31 ▼5.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.19 ▼7.96
Media Library /wp-admin/upload.php3.24 ▲0.0133.06 ▼5.78
Copy To Clipboard /wp-admin/options-general.php?page=pw-clippy_list_options3.2126.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Copy To Clipboard - mobile + web
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.28 ▼0.082.28 ▲0.6844.10 ▲0.10
Dashboard /wp-admin2,199 ▲195.61 ▲0.0885.06 ▼8.1239.68 ▼3.20
Posts /wp-admin/edit.php2,101 ▼21.98 ▲0.0134.62 ▼2.3433.70 ▼1.31
Add New Post /wp-admin/post-new.php1,529 ▲323.01 ▼0.44594.67 ▼133.5547.51 ▼5.31
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.0397.65 ▼13.5443.69 ▼5.13
Copy To Clipboard /wp-admin/options-general.php?page=pw-clippy_list_options8002.0124.3024.42

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/copy-to-clipboard-mobile-web/pw-clipboard.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

copy-to-clipboard-mobile-web/pw-clipboard.php 85% from 13 tests

The main PHP script in "Copy To Clipboard - mobile + web" version 2.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("copy-to-clipboard-mobile-web.php" instead of "pw-clipboard.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 407 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin217 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22819130
JavaScript26645
CSS12042

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin