10% simple-product-milestones

Code Review | Simple Product Milestones

WordPress plugin Simple Product Milestones scored10%from 54 tests.

About plugin

  • Plugin page: simple-product-mi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2023
  • Latest release: Aug 16, 2023
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: alberttarress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /155 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > User error in wp-content/plugins/simple-product-milestones/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.4.16.

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.97ms] Passed 4 tests

An overview of server-side resources used by Simple Product Milestones
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.79 ▼31.83
Dashboard /wp-admin2.08 ▼1.266.24 ▼51.78
Posts /wp-admin/edit.php2.08 ▼1.276.05 ▼43.35
Add New Post /wp-admin/post-new.php2.08 ▼3.805.84 ▼92.91
Media Library /wp-admin/upload.php2.08 ▼1.145.80 ▼28.13

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 1,760 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Product Milestones
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.37 ▼1.391.82 ▲0.2549.71 ▲7.17
Dashboard /wp-admin2,211 ▲235.91 ▲0.0396.91 ▼4.9177.28 ▲35.31
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0335.62 ▼5.9230.62 ▼5.94
Add New Post /wp-admin/post-new.php1,392 ▼14118.37 ▼4.85635.89 ▲41.5363.42 ▲17.12
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0495.03 ▼6.9942.17 ▼2.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User error in wp-content/plugins/simple-product-milestones/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.4.16.
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-product-milestones/simple-product-milestones.php
  • 298× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface' not found in wp-content/plugins/simple-product-milestones/vendor/symfony/translation/Formatter/MessageFormatter.php:23
    • > PHP Fatal error
      Uncaught ReflectionException: Class Symfony\\Component\\Translation\\Translator does not exist in wp-content/plugins/simple-product-milestones/vendor/nesbot/carbon/src/Carbon/Translator.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'CPF\\Field\\Field' not found in wp-content/plugins/simple-product-milestones/vendor/joanrodas/custom-product-fields/CPF/Field/TimeField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/simple-product-milestones/vendor/symfony/translation/Loader/CsvFileLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\BadMethodCallException' not found in wp-content/plugins/simple-product-milestones/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/simple-product-milestones/vendor/symfony/translation/Loader/IniFileLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CPF\\Field\\Field' not found in wp-content/plugins/simple-product-milestones/vendor/joanrodas/custom-product-fields/CPF/Field/RangeField.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\Arrayable' not found in wp-content/plugins/simple-product-milestones/vendor/illuminate/contracts/Support/MessageBag.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CPF\\Field\\Field' not found in wp-content/plugins/simple-product-milestones/vendor/joanrodas/custom-product-fields/CPF/Field/FileField.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Bus\\QueueingDispatcher' not found in wp-content/plugins/simple-product-milestones/vendor/illuminate/bus/Dispatcher.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: woocomerce, products, milestones, custom, simple

simple-product-milestones/simple-product-milestones.php Passed 13 tests

The main file in "Simple Product Milestones" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Create and customize milestones for your WooCommerce products.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/simple-product-milestones/vendor/nesbot/carbon/bin/carbon.bat
70,106 lines of code in 1,518 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,44712,98944,65461,017
XSD391482,842
JSON29002,731
CSS21341121,952
Markdown2549511,246
JavaScript410112
Sass4181100
reStructuredText1747874
TypeScript14126
DOS Batch1004
YAML1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.74
▷ Minimum class complexity1.00
▷ Maximum class complexity323.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces103
Interfaces149
Traits64
Classes383
▷ Abstract classes256.53%
▷ Concrete classes35893.47%
▷ Final classes4412.29%
Methods4,355
▷ Static methods70816.26%
▷ Public methods3,65984.02%
▷ Protected methods54712.56%
▷ Private methods1493.42%
Functions670
▷ Named functions14421.49%
▷ Anonymous functions52678.51%
Constants210
▷ Global constants136.19%
▷ Class constants19793.81%
▷ Public constants19196.95%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin