90% astro-woocommerce-free-gift

Code Review | Astro WooCommerce Free Gift

WordPress plugin Astro WooCommerce Free Gift scored90%from 54 tests.

About plugin

  • Plugin page: astro-woocommerce...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2017
  • Latest release: Nov 14, 2017
  • Number of updates: 13
  • Update frequency: every 0.4 days
  • Top authors: astrotemplates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,391 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Astro WooCommerce Free Gift
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.67 ▲1.40
Dashboard /wp-admin3.36 ▲0.0552.15 ▲3.25
Posts /wp-admin/edit.php3.47 ▲0.1145.27 ▼13.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0597.57 ▼6.81
Media Library /wp-admin/upload.php3.28 ▲0.0538.39 ▲2.26

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Astro WooCommerce Free Gift
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.94 ▼0.446.12 ▲4.3141.63 ▼0.14
Dashboard /wp-admin2,215 ▲305.84 ▲0.7899.14 ▼5.4536.28 ▼5.99
Posts /wp-admin/edit.php2,095 ▲61.98 ▼0.0437.41 ▼2.5235.83 ▲4.17
Add New Post /wp-admin/post-new.php1,520 ▲617.76 ▲0.31692.86 ▼4.9451.96 ▲1.83
Media Library /wp-admin/upload.php1,397 ▲124.16 ▲0.00108.55 ▲0.1847.37 ▲1.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: woocommerce gift, woocommerce, woocommerce add-on, free gift

astro-woocommerce-free-gift/astro-woocommerce-free-gift.php Passed 13 tests

The main PHP script in "Astro WooCommerce Free Gift" version 1.0.1 is automatically included on every request by WordPress
73 characters long description:
This plugin allows you to create a list of free Gift for any product item

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
Everything looks great! No dangerous files found in this plugin349 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP15215221
PO File1121245
Sass14039
CSS17132
JavaScript13012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods20
▷ Static methods15.00%
▷ Public methods1575.00%
▷ Protected methods15.00%
▷ Private methods420.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.27MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png95.94KB34.82KB▼ 63.71%
assets/screenshot-2.png134.15KB49.83KB▼ 62.85%
assets/screenshot-3.png50.93KB19.98KB▼ 60.76%