88% additional-measurements-units-for-woocommerce

Code Review | additional measurements units for WooCommerce

WordPress plugin additional measurements units for WooCommerce scored88%from 54 tests.

About plugin

  • Plugin page: additional-measur...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2021
  • Latest release: Aug 24, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: kardi420 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /767 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
This plugin's installer ran successfully

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

Server-side resources used by additional measurements units for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.71 ▼3.72
Dashboard /wp-admin3.31 ▲0.0148.11 ▼5.07
Posts /wp-admin/edit.php3.36 ▲0.0151.47 ▲0.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.32 ▼24.97
Media Library /wp-admin/upload.php3.24 ▲0.0139.44 ▲1.37

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

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

Browser metrics Passed 4 tests

additional measurements units for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.491.75 ▼0.0542.80 ▼3.06
Dashboard /wp-admin2,195 ▲185.58 ▲0.0093.18 ▲7.7541.24 ▼0.11
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0339.58 ▲1.8136.92 ▼1.05
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▼0.36655.52 ▼34.0553.74 ▼5.64
Media Library /wp-admin/upload.php1,397 ▼64.24 ▼0.02100.01 ▼0.5048.34 ▲3.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: A description for screenshot #0 is required in additional-measurements-units-for-woocommerce/assets to your readme.txt
  • Screenshots: Screenshot #1 (measurements units screenshot.png . Note that the screenshot is stored in the /assets directory.) image required
The official readme.txt is a good inspiration

additional-measurements-units-for-woocommerce/index.php 69% from 13 tests

Analyzing the main PHP file in "additional measurements units for WooCommerce" version 1.0
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("additional-measurements-units-for-woocommerce.php" instead of "index.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.8" instead of "4.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141632

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/measurements.png56.95KB27.57KB▼ 51.58%