10% woo-add-custom-text

Code Review | Woocommerce Add Custom Text On Single Product Page

WordPress plugin Woocommerce Add Custom Text On Single Product Page scored10%from 54 tests.

About plugin

  • Plugin page: woo-add-custom-text
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 11, 2019
  • Latest release: Mar 28, 2020
  • Number of updates: 23
  • Update frequency: every 18.1 days
  • Top authors: therichpost (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,013 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/woo-add-custom-text/woocommerce-add-custom-text.php+12
    Constant Woo_ACT already defined

Server metrics [RAM: ▼1.99MB] [CPU: ▼62.08ms] Passed 4 tests

A check of server-side resources used by Woocommerce Add Custom Text On Single Product Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.455.19 ▼44.44
Dashboard /wp-admin2.07 ▼1.315.55 ▼59.40
Posts /wp-admin/edit.php2.07 ▼1.326.82 ▼42.57
Add New Post /wp-admin/post-new.php2.07 ▼3.865.20 ▼101.92
Media Library /wp-admin/upload.php2.07 ▼1.205.95 ▼30.29
Single Product Page /wp-admin/admin.php?page=single-product-page2.076.07

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Add Custom Text On Single Product Page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲2114.24 ▼0.491.70 ▼0.8642.56 ▲0.46
Dashboard /wp-admin2,198 ▲245.65 ▲0.0785.56 ▼3.8538.25 ▼3.33
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0333.66 ▼3.7733.85 ▼4.29
Add New Post /wp-admin/post-new.php1,529 ▲323.48 ▲2.32617.37 ▼71.9659.42 ▲6.39
Media Library /wp-admin/upload.php1,406 ▲64.18 ▲0.0098.05 ▼20.4246.73 ▼5.32
Single Product Page /wp-admin/admin.php?page=single-product-page1,4966.53129.5359.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/woo-add-custom-text/woocommerce-add-custom-text.php+12
    Constant Woo_ACT already defined
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=single-product-page
    • > Notice in wp-content/plugins/woo-add-custom-text/woocommerce-add-custom-text.php+12
    Constant Woo_ACT already defined

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-add-custom-text/woocommerce-add-custom-text.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: The official readme.txt is a good inspiration

woo-add-custom-text/woocommerce-add-custom-text.php 92% from 13 tests

"Woocommerce Add Custom Text On Single Product Page" version 3.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-add-custom-text.php" instead of "woocommerce-add-custom-text.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171456

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin