84% awesome-wc

Code Review | Awesome for WC

WordPress plugin Awesome for WC scored84%from 54 tests.

About plugin

  • Plugin page: awesome-wc
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Jan 14, 2021
  • Latest release: Mar 24, 2021
  • Number of updates: 13
  • Update frequency: every 5.3 days
  • Top authors: robtorres (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /567 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.94ms] Passed 4 tests

A check of server-side resources used by Awesome for WC
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0053.24 ▲9.02
Dashboard /wp-admin3.31 ▼0.0452.48 ▼15.21
Posts /wp-admin/edit.php3.36 ▲0.0049.72 ▼3.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.56 ▼15.77
Media Library /wp-admin/upload.php3.23 ▲0.0036.86 ▼4.94

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Awesome for WC: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5314.17 ▼0.381.69 ▲0.0446.90 ▲4.58
Dashboard /wp-admin2,202 ▲255.52 ▼0.0591.44 ▲2.5337.97 ▼3.97
Posts /wp-admin/edit.php2,111 ▲142.04 ▲0.0538.63 ▲2.4335.42 ▼3.35
Add New Post /wp-admin/post-new.php1,538 ▲1222.98 ▼0.52646.12 ▼62.0658.58 ▲4.87
Media Library /wp-admin/upload.php1,407 ▲74.19 ▼0.13100.47 ▼16.6948.19 ▼1.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/awesome-wc/components/stWcCouponCode/includes/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/awesome-wc/includes/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/awesome-wc/components/stWcAwesomeBusinessHours/includes/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/awesome-wc/components/stWcAwesomeBusinessHours/includes/elementor/widgetAwesomeBusinessHours.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
Please take inspiration from this readme.txt

awesome-wc/awesome.php 92% from 13 tests

The main PHP script in "Awesome for WC" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-wc.php" instead of "awesome.php")

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
No dangerous file extensions were detected36,509 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
CSS134,73413925,054
JavaScript191,1341,4469,195
PHP214573702,260

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.00
▷ Minimum class complexity3.00
▷ Maximum class complexity55.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods158
▷ Static methods2113.29%
▷ Public methods14390.51%
▷ Protected methods21.27%
▷ Private methods138.23%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/product-default.png16.80KB4.69KB▼ 72.10%
assets/img/wp-icon.png0.31KB0.27KB▼ 14.29%
assets/img/icon.png0.81KB0.52KB▼ 35.46%