90% sparechange

Code Review | SpareChange - A Miner for your Website

WordPress plugin SpareChange - A Miner for your Website scored90%from 54 tests.

About plugin

  • Plugin page: sparechange
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2017
  • Latest release: Dec 18, 2017
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: sparechange (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /3,475 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.50ms] Passed 4 tests

This is a short check of server-side resources used by SpareChange - A Miner for your Website
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.06 ▲0.50
Dashboard /wp-admin3.32 ▲0.0150.96 ▼4.75
Posts /wp-admin/edit.php3.37 ▲0.0152.17 ▼1.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.77 ▼16.17
Media Library /wp-admin/upload.php3.24 ▲0.0137.01 ▲0.11

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SpareChange - A Miner for your Website
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.77 ▲0.411.74 ▼0.4644.78 ▲0.93
Dashboard /wp-admin2,214 ▲405.56 ▼0.0494.59 ▲7.5741.46 ▲0.41
Posts /wp-admin/edit.php2,116 ▲132.06 ▲0.0035.77 ▼7.4535.59 ▼2.86
Add New Post /wp-admin/post-new.php1,558 ▲3223.32 ▲5.62647.46 ▼29.8751.68 ▼15.70
Media Library /wp-admin/upload.php1,419 ▲164.23 ▲0.0697.96 ▼3.0844.06 ▼2.18

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
6 plugin tags: mining, browser miner, cryptocurrency, monetization, coinhive...

sparechange/sparechange.php 92% from 13 tests

The main PHP file in "SpareChange - A Miner for your Website" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin238 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP338117238

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin