84% simple-qr

Code Review | Simple QR

WordPress plugin Simple QR scored84%from 54 tests.

About plugin

  • Plugin page: simple-qr
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Nov 16, 2021
  • Latest release: Nov 16, 2021
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: saiarlen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Simple QR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.81 ▼12.45
Dashboard /wp-admin3.31 ▲0.0044.90 ▼5.35
Posts /wp-admin/edit.php3.36 ▲0.0048.21 ▲1.65
Add New Post /wp-admin/post-new.php5.89 ▲0.00105.12 ▲16.77
Media Library /wp-admin/upload.php3.23 ▲0.0032.25 ▲0.54

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple QR
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.19 ▼1.111.98 ▼0.4946.38 ▼5.73
Dashboard /wp-admin2,208 ▲205.90 ▲1.07107.95 ▼12.2147.24 ▼5.25
Posts /wp-admin/edit.php2,091 ▲21.99 ▼0.0140.26 ▼1.2535.34 ▼0.04
Add New Post /wp-admin/post-new.php1,535 ▲1623.20 ▲0.02718.23 ▲77.4966.82 ▲15.22
Media Library /wp-admin/upload.php1,393 ▲54.20 ▼0.21114.35 ▲15.5243.88 ▲0.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-qr/inc/asq-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-qr/inc/asq-admin-css.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: page builder, qr, elementor, qr generator, tools

simple-qr/arlen-simple-qr.php 85% from 13 tests

The main file in "Simple QR" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-qr.php" instead of "arlen-simple-qr.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected194 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP54851194

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/simple-qr.png9.73KB4.82KB▼ 50.50%