10% bitwords-io

Code Review | Bitwords

WordPress plugin Bitwords scored 10% from 54 tests.

About plugin

  • Plugin page: bitwords-io
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.9.2
  • First release: Jun 14, 2018
  • Latest release: Jul 13, 2018
  • Number of updates: 10
  • Update frequency: every 3.0 days
  • Top authors: enamakel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 705 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Error in wp-includes/Requests/Transport/cURL.php+573
    Uncaught Error: Object of class stdClass could not be converted to string in wp-includes/Requests/Transport/cURL.php:573
    Stack trace:
    #0 wp-includes/Requests/Transport/cURL.php(332): Requests_Transport_cURL->get_expect_header()
    #1 wp-includes/Requests/Transport/cURL.php(135): Requests_Transport_cURL->setup_handle()
    #2 wp-includes/class-requests.php(381): Requests_Transport_cURL->request()
    #3 wp-includes/class-wp-http.php(394): Requests::request()
    #4 wp-includes/class-wp-http.php(614): WP_Http->request()
    #5 wp-includes/http.php(179): WP_Http->post()
    #6 wp-content/plugins/bitwords-io/lib/BitwordsAPI.php(36): wp_remote_post()
    #7 wp-content/plugins/bitwords-io/lib/BitwordsAPI.php(51): BitwordsAPI->_api()
    #8 wp-content/plugins/bitwords-io/bitwords_admin_settings.php(112): BitwordsAPI->registerPlugin()
    #9 wp-i

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

An overview of server-side resources used by Bitwords
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0162.78 ▲11.09
Dashboard /wp-admin3.41 ▲0.0034.02 ▼3.51
Posts /wp-admin/edit.php3.64 ▲0.0038.62 ▲1.64
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.04 ▼1,183.44
Media Library /wp-admin/upload.php3.29 ▲0.0025.14 ▲1.26

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bitwords
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1715.78 ▲0.196.71 ▼0.042.26 ▲0.08
Dashboard /wp-admin2,892 ▲316.15 ▼0.05116.48 ▼19.10159.52 ▼3.32
Posts /wp-admin/edit.php2,691 ▲343.24 ▲0.0065.73 ▼4.15143.77 ▼4.01
Add New Post /wp-admin/post-new.php1,752 ▲9120.87 ▲5.32445.77 ▲25.42163.09 ▲10.08
Media Library /wp-admin/upload.php1,695 ▼35.54 ▲0.03149.32 ▲13.40181.24 ▼0.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bitwords-io/admin/views/tab_statistics.php
  • 23× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to get property 'totalImpressions' of non-object in wp-content/plugins/bitwords-io/admin/views/tab_payouts_wallet_stats.php on line 6
    • > PHP Notice
      Trying to get property 'totalImpressions' of non-object in wp-content/plugins/bitwords-io/admin/views/tab_payouts_wallet_stats.php on line 7
    • > PHP Notice
      Trying to get property 'totalClicks' of non-object in wp-content/plugins/bitwords-io/admin/views/tab_payouts_wallet_stats.php on line 7
    • > PHP Notice
      Trying to get property 'walletAddress' of non-object in wp-content/plugins/bitwords-io/admin/views/tab_payouts_wallet_stats.php on line 2
    • > PHP Notice
      Undefined variable: dataForPublisher in wp-content/plugins/bitwords-io/admin/views/tab_payouts_wallet_stats.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bitwords-io/admin/views/agreement.php:8
    • > PHP Notice
      Undefined variable: dataForPublisher in wp-content/plugins/bitwords-io/admin/views/tab_payouts_wallet_stats.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bitwords-io/admin/views/tab_settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bitwords-io/include/shortcode.php:37
    • > PHP Notice
      Undefined variable: dataForPublisher in wp-content/plugins/bitwords-io/admin/views/tab_payouts_wallet_stats.php on line 6

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (The screen where the user enters his Ethereum withdrawal address.) image missing
You can take inspiration from this readme.txt

bitwords-io/bitwords_admin_settings.php 92% from 13 tests

The main PHP script in "Bitwords" version 1.4.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bitwords-io.php" instead of "bitwords_admin_settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin789 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP16153154552
JavaScript43612151
CSS217086

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.80
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png77.17KB21.19KB▼ 72.55%
assets/logo.png21.13KB1.63KB▼ 92.29%