89% woocommerce-stellar

Code Review | WooCommerce Stellar

WordPress plugin WooCommerce Stellar scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-stellar
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 27, 2014
  • Latest release: Dec 24, 2015
  • Number of updates: 12
  • Update frequency: every 35.8 days
  • Top authors: thenbrent (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,581 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by WooCommerce Stellar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.17 ▼0.65
Dashboard /wp-admin3.29 ▼0.0135.34 ▼13.56
Posts /wp-admin/edit.php3.36 ▼0.0037.81 ▼9.18
Add New Post /wp-admin/post-new.php5.53 ▼0.3673.37 ▼14.09
Media Library /wp-admin/upload.php3.29 ▲0.0730.96 ▼5.78

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WooCommerce Stellar: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.131.67 ▼0.2047.42 ▼4.17
Dashboard /wp-admin2,203 ▲155.83 ▲0.92104.84 ▲0.4339.43 ▼0.42
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0539.11 ▲3.0833.94 ▲2.31
Add New Post /wp-admin/post-new.php1,533 ▼023.13 ▼0.05697.85 ▲41.8860.03 ▲7.40
Media Library /wp-admin/upload.php1,388 ▲34.13 ▼0.16102.17 ▲0.1341.63 ▼1.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% 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
These attributes need to be fixed: Please take inspiration from this readme.txt

woocommerce-stellar/woocommerce-stellar-gateway.php 69% from 13 tests

"WooCommerce Stellar" version 1.0.2'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:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-stellar.php" instead of "woocommerce-stellar-gateway.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,542 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4206821,706
PHP7221448667
SVG101112
CSS10057

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.33
▷ Minimum class complexity4.00
▷ Maximum class complexity80.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods51
▷ Static methods35.88%
▷ Public methods4894.12%
▷ Protected methods11.96%
▷ Private methods23.92%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png3.02KB1.58KB▼ 47.67%
assets/images/stellar_rocket.png1.86KB1.63KB▼ 12.41%
assets/images/stellar-rocket.png30.47KB7.88KB▼ 74.13%