84% marketplace-bitcoin-gateway

Code Review | Marketplace Bitcoin Gateway

WordPress plugin Marketplace Bitcoin Gateway scored84%from 54 tests.

About plugin

  • Plugin page: marketplace-bitco...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8
  • WordPress version: 6.3.1
  • First release: Dec 28, 2017
  • Latest release: Dec 30, 2017
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: btcmarketplace (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /8,987 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Marketplace Bitcoin Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.69 ▼1.60
Dashboard /wp-admin3.32 ▲0.0245.98 ▼4.36
Posts /wp-admin/edit.php3.37 ▲0.0243.63 ▲5.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0278.99 ▼19.42
Media Library /wp-admin/upload.php3.25 ▲0.0232.27 ▼0.48

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Marketplace Bitcoin Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.28 ▼0.071.86 ▲0.1044.93 ▼3.24
Dashboard /wp-admin2,205 ▲345.65 ▲0.0694.43 ▼8.1345.62 ▲1.43
Posts /wp-admin/edit.php2,114 ▲142.00 ▲0.0235.45 ▼7.8935.16 ▲0.71
Add New Post /wp-admin/post-new.php1,539 ▲1023.31 ▲0.35682.01 ▲66.1054.78 ▼8.76
Media Library /wp-admin/upload.php1,407 ▲74.20 ▲0.0199.06 ▼2.9041.02 ▼3.13

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/marketplace-bitcoin-gateway/marketplace-bitcoin-gateway.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 require attention:
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
The official readme.txt is a good inspiration

marketplace-bitcoin-gateway/marketplace-bitcoin-gateway.php Passed 13 tests

This is the main PHP file of "Marketplace Bitcoin Gateway" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
62 characters long description:
Bitcoin Payment Gateway ( WooCommerce MarketPlace Compatible )

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
There were no executable files found in this plugin4,130 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS74042812,580
PHP153083231,262
JavaScript72118210
PO File1303478

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity21.42
▷ Minimum class complexity1.00
▷ Maximum class complexity165.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods75
▷ Static methods34.00%
▷ Public methods7397.33%
▷ Protected methods00.00%
▷ Private methods22.67%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
17 PNG files occupy 0.13MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/dclogo-2x.png4.35KB1.74KB▼ 60.10%
(invalid) lib/jquery/upload/images/Placeholdertxt.png12.41KB0.00KB▼ 100.00%
(invalid) assets/images/question_mark.png0.86KB0.00KB▼ 100.00%
(invalid) lib/jquery/upload/images/Placeholderdoc.png14.84KB0.00KB▼ 100.00%
assets/images/cards.png2.72KB2.41KB▼ 11.37%