89% kontur-copy-code-button

Code Review | kontur Copy Code Button

WordPress plugin kontur Copy Code Button scored89%from 54 tests.

About plugin

  • Plugin page: kontur-copy-code-...
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2020
  • Latest release: Jun 14, 2023
  • Number of updates: 27
  • Update frequency: every 38.9 days
  • Top authors: netzaufsicht (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,752 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.34ms] Passed 4 tests

An overview of server-side resources used by kontur Copy Code Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.64 ▲0.92
Dashboard /wp-admin3.43 ▲0.1351.70 ▼0.83
Posts /wp-admin/edit.php3.49 ▲0.1352.76 ▼2.69
Add New Post /wp-admin/post-new.php6.02 ▲0.13100.61 ▼6.75
Media Library /wp-admin/upload.php3.36 ▲0.1339.58 ▲2.67
kontur Copy Code Button /wp-admin/themes.php?page=kontur-copy-code-button3.3638.84

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 15 new options
New WordPress options
kontur_button_text
kontur_copy_button_use_logo
db_upgraded
kontur_copy_code_button_color
kontur_copy_button_class
theysaidso_admin_options
kontur_copy_button_logo
kontur_pre_background
widget_theysaidso_widget
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for kontur Copy Code Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13013.83 ▼0.7712.41 ▲10.2642.55 ▼2.73
Dashboard /wp-admin2,202 ▲285.62 ▲0.0687.24 ▼18.6544.20 ▲2.29
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0038.21 ▼1.8034.17 ▼3.43
Add New Post /wp-admin/post-new.php1,529 ▲123.00 ▼0.25642.21 ▼12.0954.27 ▼0.84
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.08105.67 ▲7.2841.47 ▼1.52
kontur Copy Code Button /wp-admin/themes.php?page=kontur-copy-code-button1,9784.5790.37101.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

kontur-copy-code-button/kontur-copy-code-button.php 92% from 13 tests

The entry point to "kontur Copy Code Button" version 1.1.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)

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 plugin2,705 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS3457151,849
PHP434476521
SVG717186
JavaScript37119149

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.21MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/kontur_copy_code_button.png216.48KB64.56KB▼ 70.18%