74% crypto-qr-code-wp

Code Review | Crypto QR Code WP

WordPress plugin Crypto QR Code WP scored74%from 54 tests.

About plugin

  • Plugin page: crypto-qr-code-wp
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Jul 1, 2020
  • Number of updates: 8
  • Update frequency: every 70.4 days
  • Top authors: ksym04 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,369 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▲0.23ms] Passed 4 tests

A check of server-side resources used by Crypto QR Code WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6346.00 ▲6.80
Dashboard /wp-admin3.94 ▲0.6451.45 ▲0.93
Posts /wp-admin/edit.php3.99 ▲0.6348.82 ▲4.33
Add New Post /wp-admin/post-new.php6.46 ▲0.5782.82 ▼10.58
Media Library /wp-admin/upload.php3.87 ▲0.6337.84 ▲6.23

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 443 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_crypto_qr_code_wp_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Crypto QR Code WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18114.11 ▼0.575.70 ▲3.8143.62 ▼4.58
Dashboard /wp-admin2,213 ▲254.89 ▼0.97111.92 ▲14.2242.02 ▲1.53
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0235.19 ▼2.7833.86 ▼1.65
Add New Post /wp-admin/post-new.php1,518 ▼1523.64 ▲0.44621.34 ▼61.6254.82 ▲0.69
Media Library /wp-admin/upload.php1,386 ▼24.23 ▲0.0395.43 ▼10.1841.03 ▼1.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_crypto_qr_code_wp_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 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 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/crypto-qr-code-wp/includes/vendor/phpqrcode/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: qr code, crypto, bitcoin, cryptocurrency

crypto-qr-code-wp/crypto-qr-code-wp.php Passed 13 tests

The principal PHP file in "Crypto QR Code WP" v. 1.0.2 is loaded by WordPress automatically on each request
49 characters long description:
Add cryptocurrencies QR code donate with tooltip.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/crypto-qr-code-wp/includes/vendor/phpqrcode/tools/merge.bat
6,807 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,6782,2696,668
CSS19080
Markdown120031
JavaScript14524
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity30.08
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods392
▷ Static methods13634.69%
▷ Public methods28873.47%
▷ Protected methods9624.49%
▷ Private methods82.04%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants102
▷ Global constants102100.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
40 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/vendor/phpqrcode/cache/frame_4.png0.15KB0.14KB▼ 1.34%
includes/vendor/phpqrcode/cache/frame_9.png0.19KB0.19KB▼ 2.01%
includes/vendor/phpqrcode/cache/frame_18.png0.22KB0.21KB▼ 5.26%
includes/vendor/phpqrcode/cache/frame_11.png0.20KB0.19KB▼ 6.83%
includes/vendor/phpqrcode/cache/frame_17.png0.21KB0.19KB▼ 6.64%