10% envelope-challenge

Code Review | Envelope Challenge

WordPress plugin Envelope Challenge scored 10% from 54 tests.

About plugin

  • Plugin page: envelope-challenge
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7
  • WordPress version: 5.8.1
  • First release: Mar 21, 2021
  • Latest release: Mar 21, 2021
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: podryna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 111 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/envelope-challenge/includes/class-envelope-challenge-activator.php+48
    Uncaught Error: Call to undefined function write_log() in wp-content/plugins/envelope-challenge/includes/class-envelope-challenge-activator.php:48
    Stack trace:
    #0 wp-content/plugins/envelope-challenge/includes/class-envelope-challenge-activator.php(33): envelope_challenge_install_or_upgrade()
    #1 wp-content/plugins/envelope-challenge/envelope-challenge.php(55): Envelope_Challenge_Activator::activate()
    #2 wp-includes/class-wp-hook.php(303): activate_envelope_challenge()
    #3 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(470): WP_Hook->do_action()
    #5 wp-admin/includes/plugin.php(698): do_action()

Server metrics [RAM: ▼0.00MB] [CPU: ▼134.29ms] Passed 4 tests

This is a short check of server-side resources used by Envelope Challenge
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1228.69 ▲7.97
Dashboard /wp-admin3.06 ▲0.0042.93 ▼1.55
Posts /wp-admin/edit.php3.11 ▲0.0040.30 ▼1.93
Add New Post /wp-admin/post-new.php5.42 ▼0.01101.98 ▼532.94
Media Library /wp-admin/upload.php3.00 ▲0.0031.59 ▼0.72

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Envelope Challenge
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.25 ▲0.618.60 ▲0.1147.78 ▲5.09
Dashboard /wp-admin2,964 ▲335.90 ▼0.04163.92 ▲20.89114.37 ▲1.47
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0065.40 ▲3.2488.73 ▼2.89
Add New Post /wp-admin/post-new.php1,683 ▼18918.48 ▼0.48398.66 ▲32.54130.74 ▲24.51
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.01149.93 ▲5.59116.14 ▼3.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/envelope-challenge/admin/partials/envelope-challenge-admin-display.php
    • > /wp-content/plugins/envelope-challenge/public/partials/envelope-challenge-public-display.php
    • > /wp-content/plugins/envelope-challenge/admin/class-envelope-challenge-admin.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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === envelope-challenge === )
The official readme.txt might help

envelope-challenge/envelope-challenge.php Passed 13 tests

The entry point to "Envelope Challenge" version 0.1.0 is a PHP file that has certain tags in its header comment area
84 characters long description:
Create an operational Envelope Challenge fundraiser using shortcodes and WooCommerce

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 plugin285 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12135457264
CSS23815
JavaScript24546

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin