10% ycwp-qr-me

Code Review | YCWP QR Me

WordPress plugin YCWP QR Me scored10%from 54 tests.

About plugin

  • Plugin page: ycwp-qr-me
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2012
  • Latest release: Oct 13, 2012
  • Number of updates: 50
  • Update frequency: every 4.7 days
  • Top authors: nicolamustone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,755 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_geoloc.php+42
    Declaration of QRCode_GeoLoc::set_content($lon, $lat, $alt = 0, $u = 0) should be compatible with QRCode::set_content($content)

Server metrics [RAM: ▼1.75MB] [CPU: ▼60.13ms] Passed 4 tests

This is a short check of server-side resources used by YCWP QR Me
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.216.57 ▼36.78
Dashboard /wp-admin2.27 ▼1.088.52 ▼59.00
Posts /wp-admin/edit.php2.27 ▼1.097.43 ▼47.88
Add New Post /wp-admin/post-new.php2.27 ▼3.627.57 ▼96.86
Media Library /wp-admin/upload.php2.27 ▼0.966.02 ▼30.73
YCWP QR Me /wp-admin/options-general.php?page=ycwp-qr-me-options2.276.92

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 15 new options
New WordPress options
ycwp_qr_me_effect
widget_recent-comments
widget_recent-posts
widget_ycwp-qr-me
ycwp_qr_me_error
ycwp_qr_me_classes
ycwp_qr_me_only_posts
can_compress_scripts
ycwp_qr_me_content
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for YCWP QR Me
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.63 ▼0.596.53 ▲4.3741.84 ▼5.15
Dashboard /wp-admin2,210 ▲285.81 ▼0.09107.60 ▼4.2540.82 ▼4.42
Posts /wp-admin/edit.php2,096 ▲41.99 ▼0.0539.50 ▼3.9535.49 ▲1.90
Add New Post /wp-admin/post-new.php1,545 ▲1718.39 ▲0.29616.10 ▲5.1151.89 ▼1.47
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0095.19 ▼6.5744.32 ▼1.14
YCWP QR Me /wp-admin/options-general.php?page=ycwp-qr-me-options1,0782.0723.9527.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_geoloc.php+42
    Declaration of QRCode_GeoLoc::set_content($lon, $lat, $alt = 0, $u = 0) should be compatible with QRCode::set_content($content)
  • This plugin did not uninstall successfully, leaving 15 options in the database
    • ycwp_qr_me_only_posts
    • ycwp_qr_me_size
    • widget_recent-comments
    • widget_theysaidso_widget
    • ycwp_qr_me_effect
    • theysaidso_admin_options
    • ycwp_qr_me_hide
    • ycwp_qr_me_classes
    • widget_recent-posts
    • widget_ycwp-qr-me
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=ycwp-qr-me-options
    • > Warning in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_geoloc.php+42
    Declaration of QRCode_GeoLoc::set_content($lon, $lat, $alt = 0, $u = 0) should be compatible with QRCode::set_content($content)
    • > GET request to /wp-admin/options-general.php?page=ycwp-qr-me-options
    • > Warning in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_steam.php+91
    Declaration of QRCode_Steam::set_content($type, $content) should be compatible with QRCode::set_content($content)
    • > GET request to /wp-admin/options-general.php?page=ycwp-qr-me-options
    • > Warning in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_wifi.php+40
    Declaration of QRCode_WiFi::set_content($auth_type, $ssid, $passw) should be compatible with QRCode::set_content($content)
    • > GET request to /wp-admin/options-general.php?page=ycwp-qr-me-options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in YCWP_QR_Me_Widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'QRCode' not found in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_github.php:20
    • > PHP Warning
      Declaration of QRCode_Steam::set_content($type, $content) should be compatible with QRCode::set_content($content) in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_steam.php on line 91
    • > PHP Fatal error
      Uncaught Error: Class 'QRCode' not found in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_geoloc.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'QRCode' not found in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_url.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'QRCode' not found in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_steam.php:20
    • > PHP Warning
      Declaration of QRCode_GeoLoc::set_content($lon, $lat, $alt = 0, $u = 0) should be compatible with QRCode::set_content($content) in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_geoloc.php on line 42
    • > PHP Warning
      Declaration of QRCode_WiFi::set_content($auth_type, $ssid, $passw) should be compatible with QRCode::set_content($content) in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_wifi.php on line 40
    • > PHP Fatal error
      Uncaught Error: Class 'QRCode' not found in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_androidmarket.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'QRCode' not found in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_wifi.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'QRCode' not found in wp-content/plugins/ycwp-qr-me/class.qrcode-ext/class.qrcode_twitter.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Configuration page.), #2 (Widget settings.), #3 (QR Code into posts.)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

ycwp-qr-me/ycwp-qr-me.plugin.php 92% from 13 tests

"YCWP QR Me" version 1.3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ycwp-qr-me.php" instead of "ycwp-qr-me.plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,802 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP164211,1731,804
PO File3270366712
JavaScript23287268
CSS151218

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.88
▷ Minimum class complexity2.00
▷ Maximum class complexity60.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods99
▷ Static methods00.00%
▷ Public methods6969.70%
▷ Protected methods55.05%
▷ Private methods2525.25%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/ycwp-qr-me.png0.43KB0.25KB▼ 40.55%
screenshot-2.png8.15KB4.47KB▼ 45.17%
js/ycwp-qr-me-twitter.png0.47KB0.27KB▼ 42.53%
screenshot-3.png10.82KB6.31KB▼ 41.69%
js/ycwp-qr-me-steam.png0.44KB0.26KB▼ 41.37%