62% honey-coinhive-locker

Code Review | Honey Coinhive Locker

WordPress plugin Honey Coinhive Locker scored62%from 54 tests.

About plugin

  • Plugin page: honey-coinhive-lo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2019
  • Latest release: Feb 17, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: honeyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /575 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.17MB] [CPU: ▼42.81ms] Passed 4 tests

Server-side resources used by Honey Coinhive Locker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.6613.93 ▼29.96
Dashboard /wp-admin2.84 ▼0.4616.50 ▼33.94
Posts /wp-admin/edit.php2.84 ▼0.5116.95 ▼31.73
Add New Post /wp-admin/post-new.php2.84 ▼3.0417.30 ▼75.59
Media Library /wp-admin/upload.php2.84 ▼0.3918.12 ▼16.01
Coinhive Content Locker /wp-admin/options-general.php?page=chcl2.8416.70

Server storage [IO: ▲0.73MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/honey-coinhive-locker/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 11 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
widget_recent-posts
chcl_site_key
chcl_bootstrap_button
theysaidso_admin_options
can_compress_scripts
chcl_color_setting
db_upgraded
chcl_hashes
chcl_secret_key
...

Browser metrics Passed 4 tests

Checking browser requirements for Honey Coinhive Locker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲15913.82 ▼0.556.68 ▲4.6726.35 ▼16.24
Dashboard /wp-admin2,245 ▲395.06 ▼0.86105.90 ▲5.8847.08 ▲9.48
Posts /wp-admin/edit.php2,126 ▲262.35 ▲0.3338.78 ▲0.8240.17 ▲5.23
Add New Post /wp-admin/post-new.php1,703 ▲15722.75 ▼0.39650.68 ▼37.6144.07 ▼13.21
Media Library /wp-admin/upload.php1,427 ▲244.53 ▲0.33101.94 ▼1.8953.61 ▲5.10
Coinhive Content Locker /wp-admin/options-general.php?page=chcl9962.5241.1341.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.
  • The uninstall procedure has failed, leaving 11 options in the database
    • chcl_color_setting
    • chcl_bootstrap_button
    • chcl_site_key
    • widget_recent-posts
    • chcl_secret_key
    • chcl_hashes
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > Notice in wp-content/plugins/honey-coinhive-locker/honey_locker.php+270
    Undefined variable: current_user
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > Notice in wp-content/plugins/honey-coinhive-locker/honey_locker.php+270
    Trying to get property 'user_login' of non-object
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function write_log() in wp-content/plugins/honey-coinhive-locker/honey_locker.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > Network (severe)
    http://authedmine.com/lib/authedmine.min.js?ver=6.3.1 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: CoinHive is not defined" "ReferenceError: CoinHive is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/honey-coinhive-locker/js/honey_locker.js?v1&ver=6.3.1:5:11)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=chcl
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: CoinHive is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • License uri: Please fix this invalid url: "URI: http://www.gnu.org/licenses/gpl-2.0.html"
You can look at the official readme.txt

honey-coinhive-locker/honey_locker.php 92% from 13 tests

"Honey Coinhive Locker" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("honey-coinhive-locker.php" instead of "honey_locker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected482 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23517320
JavaScript280108
PO File1191953
CSS1061

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions17
▷ Named functions17100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/honeylogo.png38.97KB5.05KB▼ 87.04%