89% woo-mycelium-gear

Code Review | WooCommerce Mycelium Gear

WordPress plugin WooCommerce Mycelium Gear scored 89% from 54 tests.

About plugin

  • Plugin page: woo-mycelium-gear
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.3-5.8
  • WordPress version: 6.3.1
  • First release: Nov 16, 2017
  • Latest release: Aug 23, 2021
  • Number of updates: 9
  • Update frequency: every 152.9 days
  • Top authors: anasbinmukim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,119 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.19MB] [CPU: ▼10.24ms] Passed 4 tests

Server-side resources used by WooCommerce Mycelium Gear
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6218.05 ▼21.56
Dashboard /wp-admin3.32 ▲0.0245.89 ▼4.38
Posts /wp-admin/edit.php3.19 ▼0.1729.18 ▼17.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.87 ▲2.25
Media Library /wp-admin/upload.php3.25 ▲0.0236.06 ▲2.07

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
recovery_mode_email_last_sent
db_upgraded

Browser metrics Passed 4 tests

WooCommerce Mycelium Gear: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,456 ▼35513.31 ▼1.550.52 ▼1.6018.33 ▼26.58
Dashboard /wp-admin2,206 ▲34.82 ▼0.00109.55 ▼0.7743.33 ▲0.76
Posts /wp-admin/edit.php45 ▼2,0440.44 ▼1.540.09 ▼32.669.54 ▼23.56
Add New Post /wp-admin/post-new.php1,529 ▼422.90 ▼0.33675.42 ▼32.5880.44 ▲21.23
Media Library /wp-admin/upload.php1,391 ▲34.23 ▼0.0499.39 ▼9.5145.74 ▲0.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: mycelium, payment gateway, woocommerce, bitcoin payments, gear

woo-mycelium-gear/woo-mycelium-gear.php 92% from 13 tests

"WooCommerce Mycelium Gear" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.2.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin428 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3108248428

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.67
▷ Minimum class complexity6.00
▷ Maximum class complexity25.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.72MB with 0.49MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png272.67KB77.51KB▼ 71.57%
assets/screenshot-2.png306.13KB90.23KB▼ 70.53%
assets/screenshot-3.png133.57KB40.13KB▼ 69.95%
images/mycelium.png29.60KB11.72KB▼ 60.40%