94% stats-dashboard-for-coinpayments

Code Review | Stats Dashboard for Coinpayments

WordPress plugin Stats Dashboard for Coinpayments scored 94% from 54 tests.

About plugin

  • Plugin page: stats-dashboard-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0+
  • WordPress version: 5.8.1
  • First release: Dec 31, 2016
  • Latest release: Jan 1, 2017
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: soleo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 718 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼143.24ms] Passed 4 tests

An overview of server-side resources used by Stats Dashboard for Coinpayments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1537.96 ▲17.62
Dashboard /wp-admin3.13 ▲0.0744.78 ▼5.78
Posts /wp-admin/edit.php3.24 ▲0.1343.88 ▼4.42
Add New Post /wp-admin/post-new.php5.48 ▲0.0595.71 ▼569.13
Media Library /wp-admin/upload.php3.07 ▲0.0635.91 ▲6.37
Coinpayments /wp-admin/options-general.php?page=stats-dashboard-for-coinpayments3.0434.98

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Stats Dashboard for Coinpayments: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲16715.77 ▲0.1911.11 ▲1.7347.64 ▼6.78
Dashboard /wp-admin3,017 ▲835.92 ▼0.03145.16 ▼4.17128.27 ▲5.98
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0271.85 ▲3.1395.16 ▼5.79
Add New Post /wp-admin/post-new.php1,503 ▼10118.54 ▼0.21384.31 ▼11.09117.71 ▲6.46
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.04155.09 ▼9.25130.94 ▼6.19
Coinpayments /wp-admin/options-general.php?page=stats-dashboard-for-coinpayments1,0572.0961.9387.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/stats-dashboard-for-coinpayments/stats-dashboard-for-coinpayments.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stats-dashboard-for-coinpayments/src/settings-page.php:38

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tested up to: Version format is invalid
Please take inspiration from this readme.txt

stats-dashboard-for-coinpayments/stats-dashboard-for-coinpayments.php Passed 13 tests

The main PHP file in "Stats Dashboard for Coinpayments" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
49 characters long description:
A plugin to display stats from coinpayments.net .

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin342 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP675316338
Markdown1304

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.50
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods937.50%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png62.33KB17.38KB▼ 72.12%
assets/icon-256x256.png13.07KB4.46KB▼ 65.91%
assets/icon-128x128.png6.80KB2.82KB▼ 58.54%
assets/banner-772x250.png26.63KB8.55KB▼ 67.89%
assets/screenshot-1.png72.51KB24.28KB▼ 66.51%