84% custom-design-product

Code Review | Woocommerce Custom Print

WordPress plugin Woocommerce Custom Print scored84%from 54 tests.

About plugin

  • Plugin page: custom-design-pro...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Oct 10, 2018
  • Number of updates: 45
  • Update frequency: every 15.1 days
  • Top authors: ahmadasjad (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,480 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
Install script ran successfully

Server metrics [RAM: ▼0.69MB] [CPU: ▼13.05ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Custom Print
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.38 ▼0.64
Dashboard /wp-admin3.32 ▲0.0149.18 ▲4.47
Posts /wp-admin/edit.php3.37 ▲0.0145.65 ▼0.06
Add New Post /wp-admin/post-new.php3.10 ▼2.7834.44 ▼48.76
Media Library /wp-admin/upload.php3.24 ▲0.0132.56 ▼2.72

Server storage [IO: ▲0.10MB] [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: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Custom Print
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.74 ▼0.624.53 ▲2.6837.92 ▼5.17
Dashboard /wp-admin2,209 ▲334.82 ▼0.0699.01 ▼18.4740.92 ▼23.57
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0734.39 ▼3.8034.38 ▲0.38
Add New Post /wp-admin/post-new.php1,535 ▲1623.18 ▲0.06601.77 ▼85.0455.66 ▼3.14
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.1094.05 ▼22.8742.42 ▼4.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-design-product/product-detail-page.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-design-product/custom-print.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-design-product/cart-n-order.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-design-product/meta_box.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === custom-design-product === )
The official readme.txt is a good inspiration

custom-design-product/custom-print.php 92% from 13 tests

The main file in "Woocommerce Custom Print" v. 1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-design-product.php" instead of "custom-print.php")

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
Everything looks great! No dangerous files found in this plugin324 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP442136324

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.08MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/Half_OFF.png15.74KB0.51KB▼ 96.77%
img/Mirror_OFF.png15.67KB0.44KB▼ 97.18%
img/half-drop.png1.69KB0.51KB▼ 69.83%
img/Brick_OFF.png15.69KB0.59KB▼ 96.26%
img/Center_OFF.png15.41KB0.34KB▼ 97.79%