73% product-editor

Code Review | Product Editor

WordPress plugin Product Editor scored73%from 54 tests.

About plugin

  • Plugin page: product-editor
  • Plugin version: 1.0.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2022
  • Latest release: Jan 30, 2023
  • Number of updates: 29
  • Update frequency: every 13.1 days
  • Top authors: devhedgehog (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

900+ active /5,057 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼5.51ms] Passed 4 tests

A check of server-side resources used by Product Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2339.13 ▼1.17
Dashboard /wp-admin3.53 ▲0.2246.97 ▼9.23
Posts /wp-admin/edit.php3.64 ▲0.2850.13 ▼1.81
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.55 ▼9.82
Media Library /wp-admin/upload.php3.45 ▲0.2239.12 ▲7.92

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: 1 new table, 6 new options
New tables
wp_pe_reverse_steps
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.27 ▼1.011.71 ▼0.5240.52 ▼8.71
Dashboard /wp-admin2,203 ▲275.85 ▲0.92106.65 ▼6.5440.86 ▼6.44
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0440.76 ▲2.1935.07 ▲1.25
Add New Post /wp-admin/post-new.php1,542 ▲2818.48 ▲0.98598.60 ▼89.3154.93 ▲2.64
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.01108.15 ▲10.1045.47 ▲3.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_pe_reverse_steps
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • 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 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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-editor/admin/partials/product-editor-admin-table-rows.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_children() on null in wp-content/plugins/product-editor/admin/partials/product-editor-admin-table-variations-rows.php:14
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/product-editor/admin/partials/product-editor-admin-table-variations-rows.php on line 14
    • > PHP Notice
      Undefined variable: products in wp-content/plugins/product-editor/admin/partials/product-editor-admin-table-rows.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/product-editor/admin/partials/product-editor-admin-display.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #2, #4 in product-editor/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt is a good inspiration

product-editor/product-editor.php 92% from 13 tests

The main file in "Product Editor" v. 1.0.13 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.5")

Code Analysis Passed 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
No dangerous file extensions were detected5,848 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31786532,044
CSS5160901,534
PHP151847321,376
PO File3336457894

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity21.14
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods58
▷ Static methods1424.14%
▷ Public methods3865.52%
▷ Protected methods00.00%
▷ Private methods2034.48%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/libs/jquery-ui-1.13.0/images/ui-icons_444444_256x240.png6.92KB4.18KB▼ 39.61%
admin/img/link-icon.png2.63KB2.52KB▼ 4.05%