84% paone-personalization

Code Review | Product Personalization for WC

WordPress plugin Product Personalization for WC scored84%from 54 tests.

About plugin

  • Plugin page: paone-personaliza...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Apr 8, 2020
  • Latest release: May 19, 2020
  • Number of updates: 12
  • Update frequency: every 3.5 days
  • Top authors: pawansahai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 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.34MB] [CPU: ▼14.43ms] Passed 4 tests

Analyzing server-side resources used by Product Personalization for WC
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.99 ▼36.34
Dashboard /wp-admin3.32 ▲0.0146.51 ▼7.81
Posts /wp-admin/edit.php3.37 ▲0.0145.70 ▼0.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.36 ▼12.69
Media Library /wp-admin/upload.php3.24 ▲0.0134.48 ▲1.88

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 85 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Product Personalization for WC
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16814.12 ▼0.266.09 ▲4.3637.47 ▼6.17
Dashboard /wp-admin2,221 ▲365.83 ▼0.02101.56 ▼24.5381.11 ▲33.45
Posts /wp-admin/edit.php2,101 ▲91.99 ▼0.0734.86 ▼3.3130.52 ▼3.27
Add New Post /wp-admin/post-new.php1,527 ▼123.17 ▼0.03768.70 ▲100.8750.61 ▼6.28
Media Library /wp-admin/upload.php1,400 ▲94.13 ▼0.0397.76 ▼0.8072.31 ▲25.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/paone-personalization/admin/class.paone_admin_model.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paone-personalization/cart/class.cart.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PAONE_Frontend' not found in wp-content/plugins/paone-personalization/frontend/templates/single-product.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function menu_page_url() in wp-content/plugins/paone-personalization/admin/class.paone_admin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #3 (Backend screen 2) image missing
You can look at the official readme.txt

paone-personalization/paone-personalization.php Passed 13 tests

The main PHP script in "Product Personalization for WC" version 1.0.0 is automatically included on every request by WordPress
93 characters long description:
Quickly add personalization fields like name, font color, font name on your woocommerce shop.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin12,858 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript672,90489511,659
PHP9106146657
CSS5709542

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity6.77
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods215.38%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/personalization.png0.79KB0.64KB▼ 18.11%
assets/images/add-icon.png1.48KB1.57KB0.00%
assets/images/delete-icon.png1.27KB1.39KB0.00%