90% dynamic-step-pricing

Code Review | Dynamic Step Pricing

WordPress plugin Dynamic Step Pricing scored90%from 54 tests.

About plugin

  • Plugin page: dynamic-step-pricing
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Jun 7, 2018
  • Number of updates: 3
  • Update frequency: every 34.7 days
  • Top authors: fuxlab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /592 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.15ms] Passed 4 tests

An overview of server-side resources used by Dynamic Step Pricing
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.64 ▼8.99
Dashboard /wp-admin3.36 ▲0.0543.77 ▼8.97
Posts /wp-admin/edit.php3.47 ▲0.1147.97 ▲0.45
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.69 ▼15.10
Media Library /wp-admin/upload.php3.28 ▲0.0532.33 ▲1.33
Dynamic Step Pricing /wp-admin/options-general.php?page=dynamic-step-pricing-admin3.2428.44

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Dynamic Step Pricing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.47 ▼0.202.04 ▲0.2337.57 ▼5.67
Dashboard /wp-admin2,210 ▲194.86 ▼0.07112.30 ▼3.1743.36 ▼3.92
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0542.10 ▲3.7234.85 ▲2.59
Add New Post /wp-admin/post-new.php1,517 ▼1617.71 ▼5.55672.77 ▲14.1758.99 ▲8.32
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.11100.37 ▲5.6840.01 ▼2.76
Dynamic Step Pricing /wp-admin/options-general.php?page=dynamic-step-pricing-admin7832.0326.5432.06

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 detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (The main plugin interface.), #2 (Regenerating in progress.), #3 (Interface for regenerating a single attachment.), #4 (Individual images can be regenerated from the media library in list view.), #5 (They can also be regenerated from the edit attachment screen.)
Please take inspiration from this readme.txt

dynamic-step-pricing/dynamic-step-pricing.php Passed 13 tests

The principal PHP file in "Dynamic Step Pricing" v. 0.0.1 is loaded by WordPress automatically on each request
59 characters long description:
dynamic variable products with step pricing for woocommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin319 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44636228
JavaScript1151868
Markdown19023

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.50
▷ Minimum class complexity5.00
▷ Maximum class complexity6.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin