78% stupid-simple-qr

Code Review | Stupid Simple QR

WordPress plugin Stupid Simple QR scored 78% from 54 tests.

About plugin

  • Plugin page: stupid-simple-qr
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 19, 2014
  • Latest release: Apr 5, 2017
  • Number of updates: 30
  • Update frequency: every 67.7 days
  • Top authors: gabrielmcgovern (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 2,145 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
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼8.18ms] Passed 4 tests

A check of server-side resources used by Stupid Simple QR
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.07 ▼6.66
Dashboard /wp-admin3.33 ▲0.0345.06 ▼5.30
Posts /wp-admin/edit.php3.22 ▼0.1434.23 ▼9.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.43 ▼11.74
Media Library /wp-admin/upload.php3.25 ▲0.0234.32 ▼0.49
Stupid Simple QR /wp-admin/options-general.php?page=ssqr-setting3.1929.53

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stupid Simple QR
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.48 ▼1.204.40 ▲2.4239.99 ▼2.21
Dashboard /wp-admin2,213 ▲254.89 ▲0.0495.79 ▼23.2138.80 ▼5.00
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0840.29 ▲5.4336.98 ▲5.15
Add New Post /wp-admin/post-new.php1,536 ▲1723.35 ▲2.20652.16 ▼40.5554.06 ▼2.32
Media Library /wp-admin/upload.php1,392 ▲44.27 ▲0.0891.99 ▼19.4441.98 ▼9.65
Stupid Simple QR /wp-admin/options-general.php?page=ssqr-setting7822.0324.6827.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ssqr-setting
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ssqr-setting
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=ssqr-setting
    • > Notice in wp-content/plugins/stupid-simple-qr/options.php+116
    Trying to access array offset on value of type bool

SRP 50% 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 fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stupid-simple-qr/network-options.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/stupid-simple-qr/stupid-simple-qr.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/stupid-simple-qr/options.php:122

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Pushing the button creates a QR code!)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === stupid-simple-qr === )
You can look at the official readme.txt

stupid-simple-qr/stupid-simple-qr.php Passed 13 tests

"Stupid Simple QR" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
Adds a 'QR' button next to 'Get Shortlink' on published pages and posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin163 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34164154
JavaScript14109

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.46KB8.42KB▼ 65.57%
screenshot-2.png2.50KB0.62KB▼ 75.30%