83% price-display-anywhere

Code Review | Price Display Anywhere

WordPress plugin Price Display Anywhere scored 83% from 54 tests.

About plugin

  • Plugin page: price-display-any...
  • Plugin version: 1.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Dec 26, 2020
  • Latest release: Aug 19, 2021
  • Number of updates: 12
  • Update frequency: every 19.8 days
  • Top authors: zitengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.03ms] Passed 4 tests

Analyzing server-side resources used by Price Display Anywhere
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.65 ▼8.00
Dashboard /wp-admin3.31 ▲0.0146.01 ▼5.56
Posts /wp-admin/edit.php3.36 ▲0.0145.76 ▼7.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.35 ▼10.94
Media Library /wp-admin/upload.php3.23 ▲0.0133.08 ▼2.88

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Price Display Anywhere: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.20 ▼1.381.85 ▲0.0441.10 ▼2.54
Dashboard /wp-admin2,206 ▲154.82 ▼0.07103.78 ▼1.8338.54 ▼8.89
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0438.23 ▲0.0136.30 ▲3.75
Add New Post /wp-admin/post-new.php1,533 ▼123.13 ▲0.01653.87 ▼31.1155.50 ▲5.04
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.0593.54 ▼9.8742.33 ▼2.37

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/price-display-anywhere/wcpricedisplay.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt is a good inspiration

price-display-anywhere/wcpricedisplay.php 69% from 13 tests

The entry point to "Price Display Anywhere" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("price-display-anywhere.php" instead of "wcpricedisplay.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 305 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin23 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP272223

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 were not PNG files found in your plugin