77% dynamic-content-for-woocommerce

Code Review | Dynamic Content for WooCommerce

WordPress plugin Dynamic Content for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: dynamic-content-f...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 2, 2018
  • Latest release: Mar 9, 2018
  • Number of updates: 13
  • Update frequency: every 0.7 days
  • Top authors: fuji9 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /769 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.59ms] Passed 4 tests

This is a short check of server-side resources used by Dynamic Content for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.75 ▼0.16
Dashboard /wp-admin3.31 ▼0.0347.77 ▼16.52
Posts /wp-admin/edit.php3.37 ▲0.0148.22 ▼4.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.04 ▼13.10
Media Library /wp-admin/upload.php3.24 ▲0.0141.91 ▲4.65

Server storage [IO: ▲0.05MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Dynamic Content for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12013.52 ▼0.669.16 ▲7.4344.88 ▲4.18
Dashboard /wp-admin2,199 ▲325.79 ▲0.1892.30 ▼12.2339.41 ▼2.82
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0239.26 ▲2.6436.21 ▲1.08
Add New Post /wp-admin/post-new.php1,531 ▲523.32 ▲5.85685.24 ▲36.9470.49 ▲12.68
Media Library /wp-admin/upload.php1,404 ▲14.21 ▲0.04101.73 ▲0.7546.75 ▼3.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/dynamic-content-for-woocommerce/admin/partials/cc-for-woocommerce-admin-display.php
    • > /wp-content/plugins/dynamic-content-for-woocommerce/public/partials/cc-for-woocommerce-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dynamic-content-for-woocommerce/includes/class-cc-for-woocommerce-shortcode.php:66

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt might help

dynamic-content-for-woocommerce/cc-for-woocommerce.php 85% from 13 tests

"Dynamic Content for WooCommerce" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for 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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dynamic-content-for-woocommerce.php" instead of "cc-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin208 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13133556202
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin