87% wpi-pricelist-shortcode

Code Review | WPi PriceList Shortcode - Create pricelist using shortcode in easy way

WordPress plugin WPi PriceList Shortcode - Create pricelist using shortcode in easy way scored 87% from 54 tests.

About plugin

  • Plugin page: wpi-pricelist-sho...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 5.8.1
  • First release: Jan 21, 2015
  • Latest release: Jan 21, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: wooprali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,523 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.29MB] [CPU: ▼164.70ms] Passed 4 tests

This is a short check of server-side resources used by WPi PriceList Shortcode - Create pricelist using shortcode in easy way
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0632.80 ▲4.97
Dashboard /wp-admin3.11 ▲0.0537.08 ▼3.91
Posts /wp-admin/edit.php3.16 ▲0.0637.32 ▲2.08
Add New Post /wp-admin/post-new.php4.11 ▼1.3338.36 ▼661.93
Media Library /wp-admin/upload.php3.06 ▲0.0532.01 ▲6.35
Add New /wp-admin/post-new.php?post_type=wpi_pricelist2.9926.80
WPi PriceList /wp-admin/edit.php?post_type=wpi_pricelist3.1029.71

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WPi PriceList Shortcode - Create pricelist using shortcode in easy way
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,710 ▲10915.99 ▼0.035.90 ▲0.2478.18 ▲1.66
Dashboard /wp-admin2,964 ▲686.05 ▼0.10114.87 ▼23.57168.57 ▼8.67
Posts /wp-admin/edit.php2,780 ▲403.25 ▲0.0362.00 ▲0.15142.43 ▲2.54
Add New Post /wp-admin/post-new.php3,729 ▼7818.63 ▲0.02435.96 ▲1.65154.74 ▲0.13
Media Library /wp-admin/upload.php1,787 ▲355.44 ▼0.05145.60 ▼0.55183.74 ▼3.07
Add New /wp-admin/post-new.php?post_type=wpi_pricelist2,2663.88103.99150.17
WPi PriceList /wp-admin/edit.php?post_type=wpi_pricelist1,4753.0659.32112.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=wpi_pricelist
    • > Notice in wp-content/plugins/wpi-pricelist-shortcode/wp-pricelist-shortcode.php+64
    Undefined index: wpi_pl_meta_box_nonce

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wpi-pricelist-shortcode/wp-pricelist-shortcode.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wpi-pricelist-shortcode/wp-pricelist-shortcode.php 77% from 13 tests

The main PHP script in "WPi PriceList Shortcode - Create pricelist using shortcode in easy way" version 1.0.0 is automatically included on every request by WordPress
Please take the time to 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpi-pricelist-shortcode.php" instead of "wp-pricelist-shortcode.php")
  • Domain Path: The domain path points to a folder that does not exist ("/locale/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected236 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11025140
CSS13196

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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