90% carmo-copy-to-clipboard

Code Review | Carmo Copy to Clipboard

WordPress plugin Carmo Copy to Clipboard scored90%from 54 tests.

About plugin

  • Plugin page: carmo-copy-to-cli...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2023
  • Latest release: Apr 27, 2023
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: carmopereira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /145 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Carmo Copy to Clipboard
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.90 ▼0.18
Dashboard /wp-admin3.32 ▲0.0142.46 ▼8.18
Posts /wp-admin/edit.php3.37 ▲0.0146.49 ▼3.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.70 ▼21.87
Media Library /wp-admin/upload.php3.24 ▲0.0134.31 ▲1.19

Server storage [IO: ▲0.47MB] [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: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Carmo Copy to Clipboard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.141.87 ▼0.0042.96 ▼3.65
Dashboard /wp-admin2,209 ▲214.85 ▼1.0597.65 ▼10.9439.91 ▼7.37
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.74 ▲1.5335.91 ▼0.10
Add New Post /wp-admin/post-new.php1,551 ▲3018.36 ▼4.75623.12 ▼59.6771.92 ▲6.81
Media Library /wp-admin/upload.php1,382 ▼94.21 ▼0.0094.93 ▼5.9440.84 ▼3.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

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
2 plugin tags: clipboard, copy

carmo-copy-to-clipboard/carmo-copy-to-clipboard.php Passed 13 tests

The entry point to "Carmo Copy to Clipboard" version 1.0.0 is a PHP file that has certain tags in its header comment area
59 characters long description:
Adds a 'Copy to Clipboard' button to Gutenberg code blocks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected86 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2132471
CSS21210
JavaScript1025

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.42MB with 0.29MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png151.75KB46.74KB▼ 69.20%
assets/screenshot-3.png203.81KB61.47KB▼ 69.84%
assets/screenshot-2.png69.42KB21.68KB▼ 68.77%