84% wpqrcode

Code Review | WpQrCode

WordPress plugin WpQrCode scored84%from 54 tests.

About plugin

  • Plugin page: wpqrcode
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Feb 13, 2015
  • Latest release: Feb 20, 2015
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: nazmul.hossain.nihal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,075 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.64ms] Passed 4 tests

Server-side resources used by WpQrCode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.16 ▲4.20
Dashboard /wp-admin3.35 ▲0.0443.08 ▼7.96
Posts /wp-admin/edit.php3.40 ▲0.0447.03 ▲6.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.03 ▼13.42
Media Library /wp-admin/upload.php3.27 ▲0.0434.80 ▼1.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WpQrCode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,085 ▲31415.06 ▲0.4423.26 ▲21.4641.22 ▼6.29
Dashboard /wp-admin2,225 ▲375.98 ▲0.11100.79 ▼16.5538.86 ▼6.70
Posts /wp-admin/edit.php2,113 ▲242.44 ▲0.4442.26 ▲2.1233.91 ▼2.46
Add New Post /wp-admin/post-new.php1,528 ▼023.23 ▲4.88666.91 ▲39.7236.79 ▼15.06
Media Library /wp-admin/upload.php1,407 ▲224.49 ▲0.3298.41 ▼4.5840.71 ▼4.56

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wpqrcode
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wpqrcode/wpqrcode.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (QrCode widget on Sidebar), #2 (Admin Settings)
The official readme.txt might help

wpqrcode/wpqrcode.php 92% from 13 tests

Analyzing the main PHP file in "WpQrCode" version 1.0.3
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 482 characters long)

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 plugin6,798 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,5441,5976,656
PHP12511142

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.21MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/hs.png2.62KB7.54KB0.00%
screenshot-1.png64.28KB24.59KB▼ 61.74%
banner-772x250.png80.63KB33.58KB▼ 58.36%
js/hv.png2.80KB7.32KB0.00%
screenshot-2.png60.36KB21.83KB▼ 63.84%