10% tjs-cryptocoins

Code Review | TJS Cryptocoin QR-code widget

WordPress plugin TJS Cryptocoin QR-code widget scored10%from 54 tests.

About plugin

  • Plugin page: tjs-cryptocoins
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Oct 28, 2016
  • Number of updates: 2
  • Update frequency: every 35.0 days
  • Top authors: Tomjesch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,737 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/tjs-cryptocoins/inc/tjs-gulden-widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; tjs_gulden_qr_widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.90ms] Passed 4 tests

Server-side resources used by TJS Cryptocoin QR-code widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.18 ▼37.66
Dashboard /wp-admin2.09 ▼1.215.66 ▼44.73
Posts /wp-admin/edit.php2.10 ▼1.266.10 ▼43.71
Add New Post /wp-admin/post-new.php2.10 ▼3.795.47 ▼81.51
Media Library /wp-admin/upload.php2.10 ▼1.135.09 ▼31.94

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_tjs_gulden
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_tjs_bitcoin
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for TJS Cryptocoin QR-code widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.30 ▲0.163.83 ▲2.0741.06 ▼2.15
Dashboard /wp-admin2,198 ▲215.58 ▲0.0590.61 ▼4.5941.00 ▼7.58
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0339.47 ▲1.6034.02 ▼1.48
Add New Post /wp-admin/post-new.php1,526 ▼1123.19 ▲4.88625.07 ▲11.6643.45 ▼17.19
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0499.66 ▼5.3442.92 ▼5.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/tjs-cryptocoins/inc/tjs-gulden-widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; tjs_gulden_qr_widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_tjs_gulden
    • widget_tjs_bitcoin
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tjs-cryptocoins/inc/tjs-gulden-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tjs-cryptocoins/inc/tjs-gulden-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tjs-cryptocoins/inc/tjs-bitcoin-widget.php:3

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 Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: gulden, bitcoin, cryptocoin, coin, qr...

tjs-cryptocoins/tjs-cryptocoin-qr.php 85% from 13 tests

"TJS Cryptocoin QR-code widget" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("tjs-cryptocoins.php" instead of "tjs-cryptocoin-qr.php")

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
Good job! No executable or dangerous file extensions detected335 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP32927147
PO File34551132
JavaScript21349
CSS1007

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/btc-icon.png3.00KB0.59KB▼ 80.16%
img/nlg-icon.png2.91KB0.41KB▼ 85.84%