83% codeqrcode-adsense

Code Review | QRCode Generator - Adsense

WordPress plugin QRCode Generator - Adsense scored83%from 54 tests.

About plugin

  • Plugin page: codeqrcode-adsense
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Jan 29, 2018
  • Number of updates: 21
  • Update frequency: every 45.7 days
  • Top authors: aklamator (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,525 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.19MB] [CPU: ▼1.71ms] Passed 4 tests

Server-side resources used by QRCode Generator - Adsense
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.89 ▲3.24
Dashboard /wp-admin3.49 ▲0.1947.92 ▼2.55
Posts /wp-admin/edit.php3.61 ▲0.2548.09 ▲2.11
Add New Post /wp-admin/post-new.php6.07 ▲0.1983.43 ▼2.96
Media Library /wp-admin/upload.php3.42 ▲0.1937.06 ▼3.45

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 31 new options
New WordPress options
qrImgSizeSingle
theysaidso_admin_options
codeQRCodeAds3
qrMarginPage
widget_wp_widget_codeqrcode_adsense
qrImgSizePage
codeQRCodeSingleWidgetTitle
qrCodeAlignSingle
codeQRCodeSingleWidgetID
codeQRCodePage
...

Browser metrics Passed 4 tests

QRCode Generator - Adsense: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.24 ▼1.144.45 ▲2.6343.80 ▼3.71
Dashboard /wp-admin2,208 ▲234.91 ▼0.96101.42 ▼3.9685.56 ▲41.07
Posts /wp-admin/edit.php2,103 ▲172.11 ▲0.0933.51 ▼3.0531.76 ▼4.65
Add New Post /wp-admin/post-new.php1,529 ▲1517.46 ▼0.10734.16 ▲36.6758.11 ▼0.03
Media Library /wp-admin/upload.php1,396 ▲114.16 ▼0.1899.24 ▼6.8076.53 ▲28.90

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
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • widget_wp_widget_codeqrcode
    • qrCodeAlignPage
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_wp_widget_codeqrcode_adsense
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/codeqrcode-adsense/codeqrcode-adsense.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/codeqrcode-adsense/codeqrcode-adsense-admin.php:17

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === codeqrcode-adsense === )
The official readme.txt is a good inspiration

codeqrcode-adsense/codeqrcode-adsense.php 92% from 13 tests

The primary PHP file in "QRCode Generator - Adsense" version 2.1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 265 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,465 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP226884837
CSS2138159489
JavaScript1017139

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity29.33
▷ Minimum class complexity11.00
▷ Maximum class complexity64.00
Average method complexity7.07
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.56MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/codeqrcode-icon.png1.43KB0.44KB▼ 69.28%
images/cqc-logo-300x225-2.png93.94KB45.11KB▼ 51.98%
assets/dataTables/images/sort_both.png1.11KB0.25KB▼ 77.46%
assets/dataTables/images/sort_asc_disabled.png1.09KB0.17KB▼ 84.66%
images/made_with_love.png1.30KB1.18KB▼ 8.80%