84% bitcan-widget

Code Review | Bitcan Widget

WordPress plugin Bitcan Widget scored 84% from 54 tests.

About plugin

  • Plugin page: bitcan-widget
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.3
  • WordPress version: 5.8.1
  • First release: Jan 9, 2020
  • Latest release: Apr 28, 2020
  • Number of updates: 9
  • Update frequency: every 12.3 days
  • Top authors: litpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Bitcan Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0135.58 ▲2.44
Dashboard /wp-admin3.07 ▲0.0146.51 ▼2.55
Posts /wp-admin/edit.php3.12 ▲0.0146.02 ▲1.47
Add New Post /wp-admin/post-new.php5.42 ▼0.0189.62 ▼572.59
Media Library /wp-admin/upload.php3.01 ▲0.0128.10 ▼4.20

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
widget_bitcan

Browser metrics Passed 4 tests

An overview of browser requirements for Bitcan Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10716.10 ▲0.717.97 ▼2.3447.02 ▼3.64
Dashboard /wp-admin2,992 ▲616.08 ▲0.09148.98 ▼7.97113.48 ▲3.72
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0067.65 ▼2.1090.73 ▼1.59
Add New Post /wp-admin/post-new.php1,683 ▲6818.78 ▼2.61381.02 ▲69.12107.50 ▲10.33
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.00153.28 ▼14.07115.81 ▲1.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_bitcan

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bitcan-widget/bitcan-widget.php:15

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: widget, cryptocurrency, bitcoin, bitcan, crypto

bitcan-widget/bitcan-widget.php Passed 13 tests

"Bitcan Widget" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Widget and shortcode of a secure platform for buying bitcoin - bitcan.pl.

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
There were no executable files found in this plugin180 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13612123
PO File1171757

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin