68% qr-links

Code Review | QR Links

WordPress plugin QR Links scored68%from 54 tests.

About plugin

  • Plugin page: qr-links
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Dec 4, 2019
  • Latest release: Jan 10, 2020
  • Number of updates: 7
  • Update frequency: every 5.3 days
  • Top authors: promoz73 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /536 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.67MB] [CPU: ▼4.90ms] Passed 4 tests

Server-side resources used by QR Links
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6749.17 ▲7.70
Dashboard /wp-admin3.98 ▲0.6852.77 ▲2.30
Posts /wp-admin/edit.php4.03 ▲0.6853.43 ▼2.41
Add New Post /wp-admin/post-new.php6.56 ▲0.6785.22 ▼23.04
Media Library /wp-admin/upload.php3.90 ▲0.6740.44 ▲3.56

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for QR Links
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.081.84 ▼0.2644.78 ▲0.20
Dashboard /wp-admin2,202 ▲225.62 ▼0.0485.42 ▼6.1943.27 ▲8.16
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0534.44 ▼2.6436.76 ▲1.23
Add New Post /wp-admin/post-new.php1,531 ▲323.16 ▲0.07651.22 ▼18.5649.76 ▼13.65
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.0197.63 ▼3.2444.63 ▼1.87
QR Links /wp-admin/qrlinks.php260.420.1115.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-links/admin/admin-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/qr-links/admin/admin-page.php:8
    • > PHP Notice
      Undefined offset: 1 in wp-content/plugins/qr-links/lib/qrlib/tools/merge.php on line 65
    • > PHP Warning
      file_get_contents(wp-content/plugins/qr-links/lib/qrlib/tools/../VERSION): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/qr-links/lib/qrlib/tools/merge.php on line 62

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/qrlinks.php
    • > Network (severe)
    wp-admin/qrlinks.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
You can take inspiration from this readme.txt

qr-links/qr-links.php 92% from 13 tests

The primary PHP file in "QR Links" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 254 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/qr-links/lib/qrlib/tools/merge.bat
3,109 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP187691,1963,044
PO File1161761
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity30.65
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods170
▷ Static methods7041.18%
▷ Public methods16597.06%
▷ Protected methods21.18%
▷ Private methods31.76%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants48
▷ Global constants3981.25%
▷ Class constants918.75%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png62.26KB26.43KB▼ 57.55%