78% zestard-product-size-chart

Code Review | Product Size Chart

WordPress plugin Product Size Chart scored78%from 54 tests.

About plugin

  • Plugin page: zestard-product-s...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Jun 13, 2020
  • Latest release: Aug 25, 2023
  • Number of updates: 14
  • Update frequency: every 83.5 days
  • Top authors: zestardtechnologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.32ms] Passed 4 tests

Analyzing server-side resources used by Product Size Chart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.47 ▼1.88
Dashboard /wp-admin3.31 ▲0.0042.64 ▼3.85
Posts /wp-admin/edit.php3.36 ▲0.0045.01 ▼2.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.54 ▼12.31
Media Library /wp-admin/upload.php3.23 ▲0.0032.73 ▼3.08

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Size Chart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.30 ▼1.461.66 ▼0.2539.47 ▼5.43
Dashboard /wp-admin2,206 ▲155.76 ▲0.89101.30 ▼4.6339.99 ▼5.03
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0439.30 ▼0.7635.87 ▼4.53
Add New Post /wp-admin/post-new.php1,533 ▲1422.93 ▼0.29679.38 ▲91.9552.33 ▲3.38
Media Library /wp-admin/upload.php1,382 ▼34.17 ▼0.1296.43 ▼4.3941.25 ▼5.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/zestard-product-size-chart/zestard-product-size-chart.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/zestard-product-size-chart/includes/admin/inc/zpsc-post-type.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_meta_box() in wp-content/plugins/zestard-product-size-chart/includes/admin/inc/zpsc-meta-box.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: "'';"
Please take inspiration from this readme.txt

zestard-product-size-chart/zestard-product-size-chart.php Passed 13 tests

"Product Size Chart" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
57 characters long description:
Allows you to create size chart for products and category

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,695 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,2503954,726
PHP61,027355494
CSS37118475

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/image/zpsc-deselect-all.png0.31KB0.34KB0.00%
includes/admin/image/zpsc-select-all.png0.42KB0.50KB0.00%