94% code-click-to-copy

Code Review | Code Click to Copy

WordPress plugin Code Click to Copy scored 94% from 54 tests.

About plugin

  • Plugin page: code-click-to-copy
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7.2
  • WordPress version: 5.8.1
  • First release: Feb 12, 2020
  • Latest release: Jul 2, 2021
  • Number of updates: 7
  • Update frequency: every 72.6 days
  • Top authors: treeflips (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active / 3,039 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Code Click to Copy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.74 ▲11.86
Dashboard /wp-admin3.06 ▲0.0145.67 ▼1.77
Posts /wp-admin/edit.php3.12 ▲0.01159.21 ▲114.51
Add New Post /wp-admin/post-new.php5.42 ▼0.01185.45 ▼474.19
Media Library /wp-admin/upload.php3.01 ▲0.0144.60 ▲9.86

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Code Click to Copy: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11615.95 ▲0.459.25 ▲1.4347.87 ▲4.89
Dashboard /wp-admin2,970 ▲365.88 ▼0.10183.98 ▲45.552,193.54 ▲2,079.44
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.01100.10 ▲34.74295.78 ▲201.93
Add New Post /wp-admin/post-new.php1,581 ▼10221.15 ▲2.68545.49 ▲169.26272.49 ▲158.89
Media Library /wp-admin/upload.php1,822 ▲154.99 ▲0.01153.28 ▲7.97120.48 ▼26.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/code-click-to-copy/wpj-code-click-to-copy.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Click anywhere on the text to copy. Little box at top-left lets you know it's copied! (show image of once clicked!))
The official readme.txt is a good inspiration

code-click-to-copy/wpj-code-click-to-copy.php 92% from 13 tests

The main file in "Code Click to Copy" v. 0.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("code-click-to-copy.php" instead of "wpj-code-click-to-copy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin58 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP151251
Markdown1507

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.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin