84% elvez-wc-stripe-card-icon

Code Review | Elvez WC Stripe Card Icon

WordPress plugin Elvez WC Stripe Card Icon scored84%from 54 tests.

About plugin

  • Plugin page: elvez-wc-stripe-c...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 27, 2020
  • Latest release: Dec 6, 2021
  • Number of updates: 10
  • Update frequency: every 37.5 days
  • Top authors: elvezcojp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /375 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.34ms] Passed 4 tests

Server-side resources used by Elvez WC Stripe Card Icon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.46 ▼2.15
Dashboard /wp-admin3.36 ▲0.0547.46 ▼7.79
Posts /wp-admin/edit.php3.47 ▲0.1149.17 ▼3.31
Add New Post /wp-admin/post-new.php5.95 ▲0.0798.19 ▼4.11
Media Library /wp-admin/upload.php3.28 ▲0.0541.30 ▲6.43
WC Stripe Card Icon /wp-admin/admin.php?page=elvez-wc-stripe-card-icon3.2433.11

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
elvez_wc_stripe_card_icon_display_icons
elvez_wc_stripe_card_icon_subscribe_email
widget_theysaidso_widget
can_compress_scripts
elvez_wc_stripe_card_icon_subscription_id
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Elvez WC Stripe Card Icon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10914.47 ▲0.071.88 ▼0.1844.85 ▼6.63
Dashboard /wp-admin2,248 ▲605.24 ▲0.31110.47 ▲2.3638.54 ▼3.66
Posts /wp-admin/edit.php2,133 ▲442.38 ▲0.3739.51 ▼1.9932.69 ▼3.58
Add New Post /wp-admin/post-new.php1,551 ▲3723.36 ▲5.93687.86 ▲9.2535.79 ▼16.11
Media Library /wp-admin/upload.php1,421 ▲334.50 ▲0.3497.85 ▼8.2041.19 ▼2.85
WC Stripe Card Icon /wp-admin/admin.php?page=elvez-wc-stripe-card-icon1,0382.5343.8627.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • elvez_wc_stripe_card_icon_subscribe_email
    • theysaidso_admin_options
    • elvez_wc_stripe_card_icon_display_icons
    • can_compress_scripts
    • elvez_wc_stripe_card_icon_subscription_id
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/elvez-wc-stripe-card-icon/public/partials/elvez-wc-stripe-card-icon-public-display.php
    • > /wp-content/plugins/elvez-wc-stripe-card-icon/admin/partials/elvez-wc-stripe-card-icon-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: plugin

elvez-wc-stripe-card-icon/elvez-wc-stripe-card-icon.php 85% from 13 tests

This is the main PHP file of "Elvez WC Stripe Card Icon" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4" instead of "7.2")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,481 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP182451,093956
CSS23038210
JavaScript41167210
PO File23033105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.08
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods78
▷ Static methods2025.64%
▷ Public methods7393.59%
▷ Protected methods00.00%
▷ Private methods56.41%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants31
▷ Global constants13.23%
▷ Class constants3096.77%
▷ Public constants30100.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 files were detected