78% coinwidget-shortcode

Code Review | Coinwidget Shortcode

WordPress plugin Coinwidget Shortcode scored78%from 54 tests.

About plugin

  • Plugin page: coinwidget-shortcode
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Jan 6, 2014
  • Latest release: Dec 23, 2014
  • Number of updates: 7
  • Update frequency: every 52.6 days
  • Top authors: Poco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,146 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.93ms] Passed 4 tests

Server-side resources used by Coinwidget Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.61 ▼2.93
Dashboard /wp-admin3.32 ▲0.0245.83 ▲1.48
Posts /wp-admin/edit.php3.37 ▲0.0146.11 ▲3.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.77 ▲5.73
Media Library /wp-admin/upload.php3.24 ▲0.0136.78 ▲1.68

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Coinwidget Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.64 ▼0.784.74 ▲2.6643.14 ▼1.43
Dashboard /wp-admin2,208 ▲165.84 ▲0.89102.41 ▼9.3537.26 ▼2.47
Posts /wp-admin/edit.php2,091 ▲22.00 ▼0.0639.42 ▲2.6235.01 ▲2.77
Add New Post /wp-admin/post-new.php1,540 ▲718.68 ▼4.60628.21 ▲15.6153.97 ▼4.37
Media Library /wp-admin/upload.php1,393 ▲114.20 ▲0.02104.63 ▲5.4843.68 ▲2.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/coinwidget-shortcode/coin_js_wrapper.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/coinwidget-shortcode/coinwidget-shortcode.php:16

User-side errors Passed 1 test

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


Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The coinwidget button that how it will appear on the page), #2 (The expanded popup when the user clicks on the button.)
The official readme.txt is a good inspiration

coinwidget-shortcode/coinwidget-shortcode.php Passed 13 tests

The main PHP script in "Coinwidget Shortcode" version 2.0 is automatically included on every request by WordPress
36 characters long description:
Shortcode for coinwidget.com buttons

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,097 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.65
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
▷ Static methods6144.53%
▷ Public methods13598.54%
▷ Protected methods00.00%
▷ Private methods21.46%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants32100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
coinwidget.com/icon_dogecoin.png4.25KB1.23KB▼ 71.10%
coinwidget.com/icon_wallet.png0.62KB0.60KB▼ 3.13%
screenshot-2.png9.86KB5.23KB▼ 47.00%
coinwidget.com/icon_qrcode.png0.31KB0.26KB▼ 14.97%
coinwidget.com/icon_bitcoin.png1.78KB1.05KB▼ 40.82%