73% neon-product-designer-for-woocommerce

Code Review | Neon Product Designer

WordPress plugin Neon Product Designer scored73%from 54 tests.

About plugin

  • Plugin page: neon-product-desi...
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2022
  • Latest release: Jul 11, 2023
  • Number of updates: 5
  • Update frequency: every 105.8 days
  • Top authors: vertim (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,113 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.37MB] [CPU: ▼35.04ms] Passed 4 tests

A check of server-side resources used by Neon Product Designer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1420.31 ▼25.10
Dashboard /wp-admin3.65 ▲0.3429.89 ▼19.20
Posts /wp-admin/edit.php3.65 ▲0.2926.92 ▼26.17
Add New Post /wp-admin/post-new.php3.65 ▼2.2423.17 ▼69.68
Media Library /wp-admin/upload.php3.65 ▲0.4225.42 ▼12.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 105 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Neon Product Designer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲22114.41 ▲0.4412.28 ▲10.1344.14 ▲3.19
Dashboard /wp-admin2,259 ▲685.63 ▼0.18107.93 ▲1.2640.23 ▲0.17
Posts /wp-admin/edit.php2,149 ▲602.66 ▲0.6849.72 ▲7.0236.55 ▼9.95
Add New Post /wp-admin/post-new.php1,565 ▲3223.55 ▲0.39642.38 ▼48.9335.70 ▼40.00
Media Library /wp-admin/upload.php1,447 ▲594.63 ▲0.27108.92 ▼2.1844.22 ▼0.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/neon-product-designer-for-woocommerce/public/partials/neon-product-designer-public-display.php
    • > /wp-content/plugins/neon-product-designer-for-woocommerce/admin/partials/neon-product-designer-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: custom neon, neon product maker, neon product designer, neon sign, neon product configurator...

neon-product-designer-for-woocommerce/neon-product-designer.php 85% from 13 tests

Analyzing the main PHP file in "Neon Product Designer" version 2.1.0
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("neon-product-designer-for-woocommerce.php" instead of "neon-product-designer.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin55,581 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript253,59911,07928,971
JSON10013,694
CSS151,571576,328
PHP248501,2225,380
SVG310715
PO File1210263486
Markdown2207

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.19
▷ Minimum class complexity1.00
▷ Maximum class complexity138.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods126
▷ Static methods1713.49%
▷ Public methods11188.10%
▷ Protected methods00.00%
▷ Private methods1511.90%
Functions37
▷ Named functions3389.19%
▷ Anonymous functions410.81%
Constants9
▷ Global constants9100.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 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/npd-dashicon.png18.19KB2.27KB▼ 87.51%
admin/images/npd-dashicon-2.png46.36KB22.53KB▼ 51.41%
admin/images/sprite.png5.94KB2.82KB▼ 52.51%