78% integrate-monero-miner

Code Review | Monero Miner Integration

WordPress plugin Monero Miner Integration scored78%from 54 tests.

About plugin

  • Plugin page: integrate-monero-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.5.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2017
  • Latest release: Sep 20, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: schmiddim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /831 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.00MB] [CPU: ▼10.17ms] Passed 4 tests

A check of server-side resources used by Monero Miner Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0725.17 ▼17.53
Dashboard /wp-admin3.32 ▲0.0248.43 ▼8.73
Posts /wp-admin/edit.php3.38 ▲0.0248.30 ▼2.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.39 ▼12.37
Media Library /wp-admin/upload.php3.25 ▲0.0240.62 ▲3.97
Monero Integration /wp-admin/options-general.php?page=schmiddim_integrate_monero_miner3.1933.82

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Monero Miner Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.36 ▲0.093.27 ▲1.5246.07 ▲3.81
Dashboard /wp-admin2,202 ▲315.62 ▼0.0284.65 ▼17.4238.60 ▼4.49
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0046.60 ▲5.3038.83 ▲1.65
Add New Post /wp-admin/post-new.php1,529 ▼723.34 ▼0.02709.81 ▲39.9057.59 ▲0.74
Media Library /wp-admin/upload.php1,407 ▲104.22 ▲0.05110.84 ▲9.7049.96 ▲2.49
Monero Integration /wp-admin/options-general.php?page=schmiddim_integrate_monero_miner7892.0327.0125.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=schmiddim_integrate_monero_miner
    • > Notice in wp-content/plugins/integrate-monero-miner/monero.php+90
    Trying to access array offset on value of type bool

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/integrate-monero-miner/monero.php:17

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: monero

integrate-monero-miner/monero.php 92% from 13 tests

The main PHP file in "Monero Miner Integration" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("integrate-monero-miner.php" instead of "monero.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1322067

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
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%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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
No PNG images were found in this plugin