89% easy-coil

Code Review | Easy Coil

WordPress plugin Easy Coil scored 89% from 53 tests.

About plugin

  • Plugin page: easy-coil
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1.1
  • WordPress version: 5.8.1
  • First release: Oct 20, 2018
  • Latest release: Apr 15, 2019
  • Number of updates: 6
  • Update frequency: every 29.5 days
  • Top authors: tommyhare (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 773 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼264.00ms] Passed 4 tests

Server-side resources used by Easy Coil
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1732.81 ▲13.50
Dashboard /wp-admin3.12 ▲0.0640.42 ▼1.54
Posts /wp-admin/edit.php3.23 ▲0.1242.68 ▲1.78
Add New Post /wp-admin/post-new.php5.48 ▲0.0591.73 ▼1,050.47
Media Library /wp-admin/upload.php3.06 ▲0.0536.32 ▼5.75
Easy Coil /wp-admin/options-general.php?page=easy-coil3.0025.14

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Coil
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲9715.82 ▲0.358.28 ▲1.8247.25 ▼4.57
Dashboard /wp-admin2,938 ▲855.94 ▲0.13133.54 ▲0.76104.91 ▲13.63
Posts /wp-admin/edit.php2,711 ▲52.68 ▼0.0266.64 ▼0.3591.12 ▼5.23
Add New Post /wp-admin/post-new.php1,656 ▼19718.79 ▼0.28368.87 ▼2.68104.72 ▼0.02
Media Library /wp-admin/upload.php1,780 ▲85.03 ▲0.02134.18 ▼16.56111.11 ▼4.70
Easy Coil /wp-admin/options-general.php?page=easy-coil1,0382.0956.0678.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=easy-coil
    • > Notice in wp-content/plugins/easy-coil/admin/class-easy-coil-admin-settings.php+60
    Undefined index: placeholder
    • > GET request to /wp-admin/options-general.php?page=easy-coil
    • > Notice in wp-content/plugins/easy-coil/admin/class-easy-coil-admin-settings.php+72
    Undefined index: desc

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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-coil/admin/partials/easy-coil-admin-display.php
    • > /wp-content/plugins/easy-coil/public/partials/easy-coil-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: coil, xrp, web, crypto, monetization...

easy-coil/easy-coil.php Passed 13 tests

The primary PHP file in "Easy Coil" version 1.5.0 is used by WordPress to initiate all plugin functionality
59 characters long description:
Easily enable Coil web monetization on your WordPress Site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected243 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP13117522243

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.21
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/xrp-logo.png7.85KB3.88KB▼ 50.55%
admin/img/xrp-tip-bot-button.png22.53KB6.94KB▼ 69.20%