84% product-configurations-table

Code Review | Product Configurations Table

WordPress plugin Product Configurations Table scored 84% from 54 tests.

About plugin

  • Plugin page: product-configura...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2020
  • Latest release: Jul 28, 2022
  • Number of updates: 4
  • Update frequency: every 206.5 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 381 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.00MB] [CPU: ▼6.92ms] Passed 4 tests

This is a short check of server-side resources used by Product Configurations Table
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.12 ▼7.47
Dashboard /wp-admin3.31 ▲0.0053.66 ▲6.32
Posts /wp-admin/edit.php3.36 ▲0.0043.87 ▼2.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.79 ▼15.82
Media Library /wp-admin/upload.php3.23 ▲0.0034.06 ▼2.22

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Configurations Table
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.46 ▲0.081.69 ▼0.2740.65 ▼1.58
Dashboard /wp-admin2,209 ▲214.89 ▼0.01102.80 ▲0.3738.43 ▼2.19
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0537.43 ▲2.3132.19 ▼2.11
Add New Post /wp-admin/post-new.php1,514 ▼1917.66 ▼5.49667.51 ▼0.1550.45 ▼6.76
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0397.04 ▼10.9543.08 ▼3.08

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant \xc2\xa0exit - assumed '\xc2\xa0exit' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-configurations-table/Model/Option/CsvImportHandler.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: product options, configurations table

product-configurations-table/product-configurations-table.php Passed 13 tests

The main PHP script in "Product Configurations Table" version 1.0.0 is automatically included on every request by WordPress
59 characters long description:
Displays product options as a table with selectable values.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin978 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP1630323817
JavaScript2500133
CSS216028

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods73
▷ Static methods45.48%
▷ Public methods6994.52%
▷ Protected methods00.00%
▷ Private methods45.48%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
view/adminhtml/web/product/edit/field_options.png62.45KB17.38KB▼ 72.18%