83% api-qrcode-generator

Code Review | API QRCode Generator

WordPress plugin API QRCode Generator scored83%from 54 tests.

About plugin

  • Plugin page: api-qrcode-generator
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.9-2.0.0
  • WordPress version: 6.3.1
  • First release: Feb 26, 2015
  • Latest release: Feb 26, 2015
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: jweblog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,923 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by API QRCode Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.66 ▼3.84
Dashboard /wp-admin3.31 ▲0.0147.85 ▼5.45
Posts /wp-admin/edit.php3.36 ▲0.0146.80 ▼5.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0199.56 ▲2.18
Media Library /wp-admin/upload.php3.23 ▲0.0135.70 ▼2.00
API QRCode Generator /wp-admin/options-general.php?page=apiqr-settings3.2034.85

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by API QRCode Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.29 ▼0.961.59 ▼0.5043.47 ▼2.19
Dashboard /wp-admin2,213 ▲255.86 ▲0.9896.65 ▼6.4541.55 ▼3.14
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0135.36 ▼2.0033.70 ▼2.32
Add New Post /wp-admin/post-new.php1,522 ▼1123.23 ▼0.03671.72 ▲40.5068.10 ▲15.99
Media Library /wp-admin/upload.php1,389 ▲14.22 ▼0.01104.29 ▲8.9341.88 ▼2.38
API QRCode Generator /wp-admin/options-general.php?page=apiqr-settings9162.0624.6162.10

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/api-qrcode-generator/wp-api-qrcode.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/api-qrcode-generator/wp-qrcode.php:51

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: There are too many tags (21 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (Shows a example content site with the generated qr code), #2 (Shows the using of the shortcode within the backend in wp-admin), #3 (The QR Code panel wp-admin), #4 (The QR Code menu setting panel wp-adim)
The official readme.txt might help

api-qrcode-generator/wp-api-qrcode.php 85% from 13 tests

The primary PHP file in "API QRCode Generator" version 1.0.1 is used by WordPress to initiate all plugin functionality
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 ("api-qrcode-generator.php" instead of "wp-api-qrcode.php")
  • Description: The description should be shorter than 140 characters (currently 345 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected133 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23237133

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
5 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png21.52KB10.44KB▼ 51.48%
screenshot-1.png15.54KB7.67KB▼ 50.67%
screenshot-3.png45.29KB24.13KB▼ 46.71%
screenshot-4.png4.69KB2.86KB▼ 39.08%
qrcode.png0.49KB0.49KB0.00%