83% btses-crypto-widget

Code Review | BTSE's Crypto Widget

WordPress plugin BTSE's Crypto Widget scored83%from 54 tests.

About plugin

  • Plugin page: btses-crypto-widget
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 31, 2022
  • Latest release: Nov 29, 2022
  • Number of updates: 11
  • Update frequency: every 2.9 days
  • Top authors: btseaffiliates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,140 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.63MB] [CPU: ▼14.72ms] Passed 4 tests

This is a short check of server-side resources used by BTSE's Crypto Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.84 ▼5.98
Dashboard /wp-admin3.35 ▲0.0444.82 ▼0.48
Posts /wp-admin/edit.php3.46 ▲0.1043.66 ▲0.41
Add New Post /wp-admin/post-new.php3.23 ▼2.6635.71 ▼52.84
Media Library /wp-admin/upload.php3.27 ▲0.0435.99 ▲1.10
BTSE WP Plugin /wp-admin/options-general.php?page=btse-crypto-widget-plugin-settings3.2431.78

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for BTSE's Crypto Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.36 ▲0.011.92 ▼0.1442.78 ▼17.91
Dashboard /wp-admin2,199 ▲195.50 ▼0.1682.51 ▼5.2939.17 ▼6.55
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0234.80 ▼1.5832.12 ▼1.69
Add New Post /wp-admin/post-new.php1,529 ▼423.63 ▲0.79637.77 ▼25.9146.88 ▼7.49
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.0193.39 ▼16.8743.43 ▼4.42
BTSE WP Plugin /wp-admin/options-general.php?page=btse-crypto-widget-plugin-settings1,2575.40117.23125.07

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/btses-crypto-widget/index.php:234

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: btse, bitcoin, widget, coin, cryptocurrency...

btses-crypto-widget/index.php 69% from 13 tests

The principal PHP file in "BTSE's Crypto Widget" v. 1.0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("btses-crypto-widget.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 348 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected170 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13633169
CSS1081
JavaScript1030

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.40MB with 0.31MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/imgOverView.png407.38KB95.03KB▼ 76.67%