56% sell-btc-by-hayyatapps

Code Review | Sell BTC - Cryptocurrency Selling Calculator

WordPress plugin Sell BTC - Cryptocurrency Selling Calculator scored56%from 54 tests.

About plugin

  • Plugin page: sell-btc-by-hayya...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 1, 2022
  • Latest release: Apr 8, 2023
  • Number of updates: 37
  • Update frequency: every 9.4 days
  • Top authors: hayyatapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,790 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.90MB] [CPU: ▼32.83ms] Passed 4 tests

A check of server-side resources used by Sell BTC - Cryptocurrency Selling Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.15 ▼0.51
Dashboard /wp-admin3.04 ▼0.2622.40 ▼23.46
Posts /wp-admin/edit.php3.05 ▼0.3123.23 ▼28.35
Add New Post /wp-admin/post-new.php3.04 ▼2.8523.49 ▼61.95
Media Library /wp-admin/upload.php3.04 ▼0.1921.34 ▼17.56
Settings /wp-admin/admin.php?page=HAYYAT_settings3.0525.17
Orders /wp-admin/admin.php?page=HAYYAT_orders3.0531.18
Developers /wp-admin/admin.php?page=HAYYAT_developers3.0521.52
Sell BTC Lite /wp-admin/admin.php?page=MAINMENUHAYYAT3.0525.07
Go Pro /wp-admin/admin.php?page=ProHAPPS3.0521.25

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: 1 new table, 6 new options
New tables
wp_happs_sellbtc_orders
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Sell BTC - Cryptocurrency Selling Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14613.44 ▼0.991.80 ▼0.1742.28 ▼0.07
Dashboard /wp-admin2,295 ▲1045.08 ▲0.05136.77 ▲36.0136.38 ▼3.02
Posts /wp-admin/edit.php2,183 ▲942.30 ▲0.3050.56 ▲12.2335.29 ▲1.64
Add New Post /wp-admin/post-new.php1,566 ▲4517.69 ▼5.14721.39 ▲23.2639.45 ▼13.21
Media Library /wp-admin/upload.php1,479 ▲884.48 ▲0.29117.88 ▲7.2242.09 ▼5.43
Settings /wp-admin/admin.php?page=HAYYAT_settings3,0029.38320.23119.41
Orders /wp-admin/admin.php?page=HAYYAT_orders9092.0136.2536.78
Developers /wp-admin/admin.php?page=HAYYAT_developers9512.0930.0734.21
Sell BTC Lite /wp-admin/admin.php?page=MAINMENUHAYYAT8642.0134.2632.53
Go Pro /wp-admin/admin.php?page=ProHAPPS1,1812.3234.3556.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ProHAPPS
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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
Please fix the following
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sell-btc-by-hayyatapps/Pages/activation.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/Pages/pro.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/lib/country_list.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/Pages/developers.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/Pages/curr/crypto.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/lib/index.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/Pages/curr/fiat.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/lib/calc.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/lib/form.php
    • > /wp-content/plugins/sell-btc-by-hayyatapps/Pages/settings.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: happs_from in wp-content/plugins/sell-btc-by-hayyatapps/lib/calc.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/sell-btc-by-hayyatapps/lib/index.php:16
    • > PHP Notice
      Undefined variable: happs_to in wp-content/plugins/sell-btc-by-hayyatapps/lib/calc.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sell-btc-by-hayyatapps/sell-btc.php:30
    • > PHP Notice
      Undefined variable: happs_from in wp-content/plugins/sell-btc-by-hayyatapps/lib/calc.php on line 4
    • > PHP Notice
      Undefined variable: happs_to in wp-content/plugins/sell-btc-by-hayyatapps/lib/calc.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AP_BTC_GET_ORDERS() in wp-content/plugins/sell-btc-by-hayyatapps/Pages/orders.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=ProHAPPS
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=ProHAPPS 195:121 Uncaught ReferenceError: iFrameResize is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: cryptocurrency calculator, sell bitcoin, sell cryptocurrency

sell-btc-by-hayyatapps/sell-btc.php 77% from 13 tests

The primary PHP file in "Sell BTC - Cryptocurrency Selling Calculator" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sell-btc-by-hayyatapps.php" instead of "sell-btc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin2,727 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
CSS7162681,647
PHP16318241,060
JavaScript100016
SVG4004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
lib/icons/btc.png1.10KB1.10KB0.00%
lib/icons/eth.png1.07KB1.08KB0.00%
lib/icons/fiat/usd.png0.82KB0.81KB▼ 1.07%
JS/tipx/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
JS/tipx/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%