83% wc-products-ticker

Code Review | WooCommerce Products Ticker

WordPress plugin WooCommerce Products Ticker scored83%from 54 tests.

About plugin

  • Plugin page: wc-products-ticker
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2015
  • Latest release: Oct 30, 2015
  • Number of updates: 13
  • Update frequency: every 0.3 days
  • Top authors: amityTheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WooCommerce Products Ticker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.89 ▲1.33
Dashboard /wp-admin3.32 ▼0.0244.60 ▼14.94
Posts /wp-admin/edit.php3.43 ▲0.0845.09 ▼0.62
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.78 ▼7.54
Media Library /wp-admin/upload.php3.24 ▲0.0131.11 ▼4.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Products Ticker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15514.17 ▼0.216.01 ▲4.3542.45 ▼1.98
Dashboard /wp-admin2,210 ▲194.85 ▼0.05107.67 ▲5.4942.90 ▲3.35
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0139.06 ▼1.1038.09 ▲3.26
Add New Post /wp-admin/post-new.php1,518 ▼123.09 ▼0.43600.31 ▼77.3157.12 ▼1.27
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0195.63 ▼11.5241.11 ▼4.11

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wc-products-ticker/templates/template-layout1.php:4
    • > PHP Notice
      Undefined variable: wcpt_query in wp-content/plugins/wc-products-ticker/templates/template-default.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wc-products-ticker/templates/template-default.php:4
    • > PHP Notice
      Undefined variable: wcpt_query in wp-content/plugins/wc-products-ticker/templates/template-layout1.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
You can take inspiration from this readme.txt

wc-products-ticker/wcpt.php 69% from 13 tests

The principal PHP file in "WooCommerce Products Ticker" v. 1.1 is loaded by WordPress automatically on each request
It is important 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
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("/languagesCopyright 2015 Amity Themes (email : info@amitythemes.com)")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.6" instead of "4.1")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-products-ticker.php" instead of "wcpt.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
Good job! No executable or dangerous file extensions detected980 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7157170600
JavaScript36849225
CSS23719155

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity30.67
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity10.89
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/down.png14.54KB0.48KB▼ 96.69%
admin/images/up.png14.52KB0.49KB▼ 96.66%
assets/images/no-thumb.png13.57KB5.52KB▼ 59.35%