83% wc-markup

Code Review | Markup For WooCommerce

WordPress plugin Markup For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-markup
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 6, 2022
  • Latest release: Oct 27, 2023
  • Number of updates: 21
  • Update frequency: every 17.0 days
  • Top authors: wpiron (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

20+ active /582 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.60ms] Passed 4 tests

A check of server-side resources used by Markup For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.61 ▲1.51
Dashboard /wp-admin3.34 ▼0.0045.19 ▼11.09
Posts /wp-admin/edit.php3.39 ▲0.0442.20 ▼1.64
Add New Post /wp-admin/post-new.php5.94 ▲0.0678.96 ▼11.18
Media Library /wp-admin/upload.php3.27 ▲0.0435.39 ▲2.65

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Markup For WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲21613.46 ▼0.908.14 ▲6.5847.31 ▲7.48
Dashboard /wp-admin2,282 ▲1025.55 ▼0.1182.58 ▼4.7846.67 ▲4.36
Posts /wp-admin/edit.php2,191 ▲912.15 ▲0.1734.25 ▼1.8738.97 ▲1.48
Add New Post /wp-admin/post-new.php1,597 ▲7123.45 ▲0.26654.54 ▼12.6066.41 ▲12.06
Media Library /wp-admin/upload.php1,493 ▲934.22 ▲0.04101.15 ▲8.5946.97 ▲4.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-markup/public/partials/wc-markup-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-2.png) image not found
  • Screenshots: Please add descriptions for these screenshots #4, #5, #6 in wc-markup/assets to your readme.txt
You can take inspiration from this readme.txt

wc-markup/wc-markup.php 92% from 13 tests

The main file in "Markup For WooCommerce" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 166 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin787 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11178488729
JavaScript2152758
CSS2080

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods4690.20%
▷ Protected methods00.00%
▷ Private methods59.80%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/img/variable.png76.67KB31.06KB▼ 59.49%
admin/partials/img/markup.png70.81KB30.61KB▼ 56.77%