68% wolfe-candy-qr-code-generator

Code Review | Wolfe Candy QR Code Generator

WordPress plugin Wolfe Candy QR Code Generator scored68%from 54 tests.

About plugin

  • Plugin page: wolfe-candy-qr-co...
  • Plugin version: 0.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2022
  • Latest release: Oct 6, 2022
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: jrackwolfe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /199 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Wolfe Candy QR Code Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.94 ▼0.82
Dashboard /wp-admin3.31 ▲0.0143.06 ▼7.99
Posts /wp-admin/edit.php3.36 ▲0.0047.37 ▲0.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.90 ▼3.59
Media Library /wp-admin/upload.php3.23 ▲0.0034.74 ▲2.24

Server storage [IO: ▲0.42MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 430 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Wolfe Candy QR Code Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.78 ▲0.411.88 ▲0.0842.80 ▼1.86
Dashboard /wp-admin2,206 ▲214.84 ▼0.05110.61 ▼5.3139.97 ▼7.84
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0240.44 ▲1.5333.92 ▲1.37
Add New Post /wp-admin/post-new.php1,537 ▲223.36 ▲0.10682.44 ▼5.1951.80 ▲4.32
Media Library /wp-admin/upload.php1,382 ▼64.21 ▼0.0695.33 ▼13.8642.07 ▼5.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wolfe-candy-qr-code-generator/qr-render.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include(): Failed opening 'phpqrcode/qrlib.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wolfe-candy-qr-code-generator/qr-render.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wolfe-candy-qr-code-generator/plugin-startup.php:21
    • > PHP Warning
      include(phpqrcode/qrlib.php): failed to open stream: No such file or directory in wp-content/plugins/wolfe-candy-qr-code-generator/qr-render.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wolfe-candy-qr-code-generator/plugin-startup.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: dynamic, qr generator, qr, qr code

wolfe-candy-qr-code-generator/wolfe-candy-qr-code-generator.php 92% from 13 tests

"Wolfe Candy QR Code Generator" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please make sure to remedy the following
  • 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/wolfe-candy-qr-code-generator/tools/merge.bat
6,192 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,5522,1036,188
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity31.79
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes00.00%
Methods369
▷ Static methods12233.06%
▷ Public methods26972.90%
▷ Protected methods9626.02%
▷ Private methods41.08%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants98
▷ Global constants98100.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
cache/frame_6.png0.15KB0.14KB▼ 1.99%
cache/frame_29.png0.23KB0.21KB▼ 7.76%
cache/frame_2.png0.14KB0.14KB▼ 2.08%
cache/frame_23.png0.21KB0.20KB▼ 8.18%
cache/frame_10.png0.20KB0.20KB▼ 0.99%