88% standard-box-sizes

Code Review | Standard Box Sizes - for WooCommerce

WordPress plugin Standard Box Sizes - for WooCommerce scored88%from 54 tests.

About plugin

  • Plugin page: standard-box-sizes
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 21, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 31
  • Update frequency: every 45.4 days
  • Top authors: enituretechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,112 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.81MB] [CPU: ▲3.33ms] Passed 4 tests

This is a short check of server-side resources used by Standard Box Sizes - for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8340.73 ▼3.66
Dashboard /wp-admin4.13 ▲0.8250.65 ▲2.86
Posts /wp-admin/edit.php4.18 ▲0.8258.16 ▲11.68
Add New Post /wp-admin/post-new.php6.67 ▲0.7895.40 ▲11.19
Media Library /wp-admin/upload.php4.05 ▲0.8239.83 ▲2.92

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Standard Box Sizes - for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4014.71 ▲0.361.64 ▼0.4037.01 ▼5.77
Dashboard /wp-admin2,207 ▲305.69 ▲0.0194.86 ▼4.9244.51 ▲6.94
Posts /wp-admin/edit.php2,112 ▲92.02 ▲0.0843.16 ▼0.0138.82 ▲0.75
Add New Post /wp-admin/post-new.php1,538 ▲1223.46 ▼0.08606.68 ▼75.9456.11 ▲2.02
Media Library /wp-admin/upload.php1,412 ▲124.27 ▼0.01101.21 ▲4.8440.46 ▲0.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
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 just a short smoke test looking for browser issues
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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in standard-box-sizes/assets to your readme.txt
You can take inspiration from this readme.txt

standard-box-sizes/en-standard-box-sizes.php 69% from 13 tests

The main PHP file in "Standard Box Sizes - for WooCommerce" ver. 1.6.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.2" instead of "6.4")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("standard-box-sizes.php" instead of "en-standard-box-sizes.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected11,296 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,209296,324
PHP216849463,986
JavaScript1176206986

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity40.00
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity6.18
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods143
▷ Static methods00.00%
▷ Public methods14097.90%
▷ Protected methods32.10%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/boxes/Envelope-172x115.png10.20KB6.29KB▼ 38.35%
admin/assets/images/boxes/Small-Box-151x115.png16.24KB8.33KB▼ 48.74%
admin/assets/images/boxes/Large-Box-146x115.png15.84KB7.97KB▼ 49.69%
admin/assets/images/boxes/Extra-Large-Box-103x115.png13.19KB6.52KB▼ 50.58%
admin/assets/images/boxes/Medium-Box-148x115.png16.37KB8.55KB▼ 47.78%