83% product-price-markup-for-woocommece

Code Review | Product Price Markup for Woocommece

WordPress plugin Product Price Markup for Woocommece scored83%from 54 tests.

About plugin

  • Plugin page: product-price-mar...
  • Plugin version: 1.0.0
  • PHP compatiblity: 4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Nov 8, 2019
  • Latest release: Nov 8, 2019
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: brightnessgroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /482 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Product Price Markup for Woocommece
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.69 ▲1.09
Dashboard /wp-admin3.31 ▲0.0045.88 ▼4.65
Posts /wp-admin/edit.php3.36 ▲0.0048.02 ▼1.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.48 ▼8.14
Media Library /wp-admin/upload.php3.23 ▲0.0034.82 ▲4.79

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Price Markup for Woocommece
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.101.84 ▼0.2244.75 ▲0.29
Dashboard /wp-admin2,203 ▲155.79 ▲0.91104.92 ▼10.9441.33 ▼0.66
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0239.65 ▼2.4635.13 ▼2.52
Add New Post /wp-admin/post-new.php1,534 ▲2023.04 ▼0.41679.83 ▲16.9361.42 ▲6.97
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0396.21 ▼1.2644.11 ▼0.64

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/product-price-markup-for-woocommece/markup.php:28

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 86% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Wocomeece frontend single product before markup page.), #2 (Wocomeece backend single product page.), #3 (Wocomeece frontend single product after markup page.)
You can take inspiration from this readme.txt

product-price-markup-for-woocommece/markup.php 77% from 13 tests

The main PHP file in "Product Price Markup for Woocommece" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6" instead of "4.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-price-markup-for-woocommece.php" instead of "markup.php")

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
Everything looks great! No dangerous files found in this plugin105 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12537105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.75MB with 0.52MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png180.45KB58.81KB▼ 67.41%
screenshot-2.png408.42KB111.34KB▼ 72.74%
screenshot-1.png181.28KB59.15KB▼ 67.37%