83% product-quantity-settings

Code Review | Product Quantity Settings

WordPress plugin Product Quantity Settings scored 83% from 54 tests.

About plugin

  • Plugin page: product-quantity-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Jun 20, 2022
  • Latest release: Jun 20, 2022
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: jjmontalban (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 276 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
Installer ran successfully

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

A check of server-side resources used by Product Quantity Settings
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.20 ▼11.45
Dashboard /wp-admin3.31 ▲0.0045.11 ▼5.18
Posts /wp-admin/edit.php3.36 ▲0.0049.55 ▲3.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.63 ▲2.51
Media Library /wp-admin/upload.php3.23 ▲0.0034.64 ▼0.59

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Product Quantity Settings: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.131.54 ▼0.3240.51 ▼7.56
Dashboard /wp-admin2,209 ▲245.90 ▲0.85104.72 ▼9.0540.41 ▼8.83
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0338.01 ▲3.3333.39 ▼2.62
Add New Post /wp-admin/post-new.php1,533 ▼523.39 ▲0.18613.85 ▼21.5648.31 ▼10.82
Media Library /wp-admin/upload.php1,391 ▲34.30 ▲0.0993.83 ▼6.5541.90 ▼2.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-quantity-settings/product-quantity-settings.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add a description for screenshot #1 in product-quantity-settings/assets to your readme.txt
You can look at the official readme.txt

product-quantity-settings/product-quantity-settings.php 92% from 13 tests

Analyzing the main PHP file in "Product Quantity Settings" version 1.0.0
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin232 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14843189
PO File1141643

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.81
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods133.33%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected