88% faircoin-donation-dutton

Code Review | FairCoinWidget Shortcode

WordPress plugin FairCoinWidget Shortcode scored 88% from 54 tests.

About plugin

  • Plugin page: faircoin-donation...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 5.9.2
  • First release: Apr 16, 2015
  • Latest release: May 1, 2015
  • Number of updates: 10
  • Update frequency: every 1.7 days
  • Top authors: widgetfaircoin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,702 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼320.58ms] Passed 4 tests

This is a short check of server-side resources used by FairCoinWidget Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0259.91 ▲2.24
Dashboard /wp-admin3.43 ▲0.0236.67 ▼1.32
Posts /wp-admin/edit.php3.66 ▲0.0145.37 ▲3.36
Add New Post /wp-admin/post-new.php6.90 ▼0.0896.21 ▼1,285.31
Media Library /wp-admin/upload.php3.31 ▲0.0127.87 ▲2.07

Server storage [IO: ▲0.30MB] [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: 33 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for FairCoinWidget Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,874 ▲12016.30 ▲0.618.57 ▲1.912.20 ▼0.33
Dashboard /wp-admin2,894 ▲336.04 ▼0.26118.31 ▼16.91156.85 ▼1.95
Posts /wp-admin/edit.php2,690 ▲23.24 ▲0.0163.64 ▲3.22141.79 ▲4.92
Add New Post /wp-admin/post-new.php1,620 ▼4119.26 ▲2.86393.88 ▼44.95157.75 ▲3.29
Media Library /wp-admin/upload.php1,701 ▼25.53 ▼0.01140.14 ▼5.68188.59 ▲5.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/faircoin-donation-dutton/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/faircoin-donation-dutton/coinwidget-shortcode.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (The coinwidget button that how it will appear on the page), #2 (The expanded popup when the user clicks on the button.)
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

faircoin-donation-dutton/coinwidget-shortcode.php 92% from 13 tests

This is the main PHP file of "FairCoinWidget Shortcode" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("faircoin-donation-dutton.php" instead of "coinwidget-shortcode.php")

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
Success! There were no dangerous files found in this plugin2,745 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP176065182,314
JavaScript11327318
CSS1142953
HTML1142437
Markdown120023

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.53
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods137
▷ Static methods6144.53%
▷ Public methods13598.54%
▷ Protected methods00.00%
▷ Private methods21.46%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants32100.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
5 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png11.58KB5.03KB▼ 56.58%
faircoinwidget/icon_wallet.png0.62KB0.60KB▼ 3.13%
faircoinwidget/icon_qrcode.png0.31KB0.26KB▼ 14.97%
screenshot-1.png2.38KB1.65KB▼ 30.42%
faircoinwidget/icon_faircoin.png0.97KB1.03KB0.00%