90% wcpas-product-attributes-shortcode

Code Review | Product Attributes Shortcode

WordPress plugin Product Attributes Shortcode scored90%from 54 tests.

About plugin

  • Plugin page: wcpas-product-att...
  • Plugin version: 1.7.0
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 11, 2021
  • Latest release: Sep 19, 2023
  • Number of updates: 14
  • Update frequency: every 61.6 days
  • Top authors: ninetyninew (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /4,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.35ms] Passed 4 tests

This is a short check of server-side resources used by Product Attributes Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.50 ▼1.20
Dashboard /wp-admin3.32 ▼0.0246.23 ▼12.77
Posts /wp-admin/edit.php3.38 ▲0.0245.95 ▼0.78
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.86 ▼14.65
Media Library /wp-admin/upload.php3.25 ▲0.0236.52 ▲3.89

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

Browser metrics Passed 4 tests

Checking browser requirements for Product Attributes Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.28 ▼0.071.74 ▼0.0443.09 ▲5.09
Dashboard /wp-admin2,205 ▲275.58 ▼0.0690.86 ▼6.4042.08 ▼0.50
Posts /wp-admin/edit.php2,108 ▲81.98 ▼0.0541.09 ▼0.0437.16 ▲0.49
Add New Post /wp-admin/post-new.php1,542 ▲518.11 ▼0.43612.79 ▼15.3467.86 ▲11.41
Media Library /wp-admin/upload.php1,410 ▲134.16 ▼0.0296.23 ▼5.4641.25 ▼1.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
3 plugin tags: shortcode, product terms, product attributes

wcpas-product-attributes-shortcode/wcpas-product-attributes-shortcode.php Passed 13 tests

Analyzing the main PHP file in "Product Attributes Shortcode" version 1.7.0
29 characters long description:
WooCommerce Extension by 99w.

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
There were no executable files found in this plugin149 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1802499
XML16339
JSON10011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.69
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%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.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
There are no PNG files in this plugin