90% product-assembly-cost

Code Review | Product Assembly / Gift Wrap / ... Cost for WooCommerce

WordPress plugin Product Assembly / Gift Wrap / ... Cost for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: product-assembly-...
  • Plugin version: 3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2018
  • Latest release: Apr 17, 2023
  • Number of updates: 57
  • Update frequency: every 32.8 days
  • Top authors: webdados (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /9,305 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
Installer ran successfully

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

A check of server-side resources used by Product Assembly / Gift Wrap / ... Cost for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.82 ▲1.58
Dashboard /wp-admin3.31 ▲0.0150.19 ▼8.08
Posts /wp-admin/edit.php3.36 ▲0.0150.14 ▼0.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.96 ▼8.28
Media Library /wp-admin/upload.php3.24 ▲0.0139.74 ▲1.27

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product Assembly / Gift Wrap / ... Cost for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.13 ▼0.142.08 ▲0.3543.84 ▼1.67
Dashboard /wp-admin2,195 ▲185.61 ▲0.0392.58 ▼10.3639.53 ▼4.37
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0138.90 ▲4.4235.71 ▼3.55
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▲0.23646.06 ▼64.0854.20 ▲0.97
Media Library /wp-admin/upload.php1,403 ▼04.20 ▼0.0299.76 ▼2.6641.03 ▼4.75

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: woocommerce, extra service, gift wrap, assembly, extra cost...

product-assembly-cost/product-assembly-cost.php Passed 13 tests

The main PHP script in "Product Assembly / Gift Wrap / ... Cost for WooCommerce" version 3.1 is automatically included on every request by WordPress
129 characters long description:
Add an option to your WooCommerce products to enable assembly, gift wrap or any other service and optionally charge a fee for it.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin712 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23373712

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity111.00
▷ Minimum class complexity111.00
▷ Maximum class complexity111.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected