89% product-tags-on-a-single-page

Code Review | WooCommerce Product Tags on a Single Page

WordPress plugin WooCommerce Product Tags on a Single Page scored89%from 54 tests.

About plugin

  • Plugin page: product-tags-on-a...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2018
  • Latest release: Feb 9, 2020
  • Number of updates: 17
  • Update frequency: every 29.3 days
  • Top authors: vorskla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,444 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.02MB] [CPU: ▼4.04ms] Passed 4 tests

A check of server-side resources used by WooCommerce Product Tags on a Single Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.30 ▼0.77
Dashboard /wp-admin3.33 ▲0.0344.61 ▼1.13
Posts /wp-admin/edit.php3.38 ▲0.0247.23 ▲0.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.47 ▼14.82
Media Library /wp-admin/upload.php3.25 ▲0.0235.42 ▲2.99
Product Tags on Single Page /wp-admin/options-general.php?page=product-tags-single-page3.2634.01

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Product Tags on a Single Page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.23 ▼1.171.67 ▼0.1239.87 ▼3.99
Dashboard /wp-admin2,204 ▲165.81 ▲0.92105.39 ▲2.8338.27 ▲0.29
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0139.95 ▲3.7533.39 ▼1.48
Add New Post /wp-admin/post-new.php1,517 ▲317.52 ▼0.00679.70 ▲4.4054.76 ▼6.15
Media Library /wp-admin/upload.php1,392 ▲74.24 ▲0.03102.69 ▼0.0344.90 ▼0.03
Product Tags on Single Page /wp-admin/options-general.php?page=product-tags-single-page9662.0424.4424.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • ptsp_active
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

product-tags-on-a-single-page/product-tags-single-page.php 85% from 13 tests

"WooCommerce Product Tags on a Single Page" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-tags-on-a-single-page.php" instead of "product-tags-single-page.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin226 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25928226

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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