10% simple-qrcode

Code Review | Simple QR Code

WordPress plugin Simple QR Code scored10%from 54 tests.

About plugin

  • Plugin page: simple-qrcode
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.0
  • WordPress version: 6.3.1
  • First release: Aug 9, 2011
  • Latest release: Dec 14, 2016
  • Number of updates: 11
  • Update frequency: every 178.2 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /10,249 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/simple-qrcode/wordpress-qr-code.php+188
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.38ms] Passed 4 tests

A check of server-side resources used by Simple QR Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.41 ▼31.26
Dashboard /wp-admin2.05 ▼1.265.62 ▼42.55
Posts /wp-admin/edit.php2.05 ▼1.315.42 ▼40.39
Add New Post /wp-admin/post-new.php2.05 ▼3.846.24 ▼87.31
Media Library /wp-admin/upload.php2.05 ▼1.185.06 ▼29.44

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple QR Code
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.68 ▲0.281.90 ▲0.3047.01 ▲5.18
Dashboard /wp-admin2,200 ▲225.63 ▲0.0096.19 ▼3.8042.39 ▲1.53
Posts /wp-admin/edit.php2,099 ▲22.02 ▼0.0035.70 ▼1.8337.09 ▲2.93
Add New Post /wp-admin/post-new.php1,528 ▼023.43 ▲0.45632.41 ▼77.0352.32 ▼11.19
Media Library /wp-admin/upload.php1,405 ▲54.17 ▼0.0294.69 ▼13.1240.95 ▼5.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/simple-qrcode/wordpress-qr-code.php+188
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_qrcwidget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-qrcode/wordpress-qr-code.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: qr code, qr widget

simple-qrcode/wordpress-qr-code.php 92% from 13 tests

The main file in "Simple QR Code" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-qrcode.php" instead of "wordpress-qr-code.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin196 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12356196

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.67
▷ Minimum class complexity4.00
▷ Maximum class complexity13.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
7fhhXUr.png0.95KB0.82KB▼ 13.42%