84% datafeedr-product-sets

Code Review | Datafeedr Product Sets

WordPress plugin Datafeedr Product Sets scored84%from 54 tests.

About plugin

  • Plugin page: datafeedr-product...
  • Plugin version: 1.3.22
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Nov 10, 2023
  • Number of updates: 275
  • Update frequency: every 13.0 days
  • Top authors: datafeedr.com (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

5,000+ active /136,182 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼13.67ms] Passed 4 tests

This is a short check of server-side resources used by Datafeedr Product Sets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3637.80 ▼4.18
Dashboard /wp-admin3.54 ▲0.1933.76 ▼25.27
Posts /wp-admin/edit.php3.61 ▲0.2539.39 ▼6.98
Add New Post /wp-admin/post-new.php5.78 ▼0.1074.22 ▼18.25
Media Library /wp-admin/upload.php3.54 ▲0.3235.39 ▲3.95
All Product Sets /wp-admin/edit.php?post_type=datafeedr-productset3.5935.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 8 new options
New WordPress options
dfrps_configuration
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
dfrps_version

Browser metrics Passed 4 tests

A check of browser resources used by Datafeedr Product Sets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3614.67 ▲0.571.79 ▼0.0942.14 ▲3.57
Dashboard /wp-admin2,225 ▲455.64 ▲0.0093.99 ▼5.8941.14 ▼2.28
Posts /wp-admin/edit.php2,130 ▲302.16 ▲0.2039.01 ▲3.2036.14 ▲1.48
Add New Post /wp-admin/post-new.php1,556 ▲2723.14 ▲0.00677.73 ▲18.9255.41 ▼3.32
Media Library /wp-admin/upload.php1,433 ▲334.21 ▲0.0299.01 ▼2.0844.85 ▲1.21
All Product Sets /wp-admin/edit.php?post_type=datafeedr-productset1,0931.9731.5932.23

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
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • dfrps_configuration
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • dfrps_version
    • widget_recent-comments

Smoke tests 75% 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/edit.php?post_type=datafeedr-productset
    • > Notice in wp-content/plugins/datafeedr-product-sets/functions/helper.php+634
    Undefined index: default_cpt

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tested up to: Invalid version format
The official readme.txt is a good inspiration

datafeedr-product-sets/datafeedr-product-sets.php 92% from 13 tests

The primary PHP file in "Datafeedr Product Sets" version 1.3.22 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 227 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin6,306 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,4361,8545,432
CSS214731820
JavaScript18254

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.82
▷ Minimum class complexity1.00
▷ Maximum class complexity165.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods165
▷ Static methods10.61%
▷ Public methods15593.94%
▷ Protected methods84.85%
▷ Private methods21.21%
Functions95
▷ Named functions9498.95%
▷ Anonymous functions11.05%
Constants9
▷ Global constants9100.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
9 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/plus.png0.38KB0.26KB▼ 31.01%
images/icons/minus.png0.32KB0.24KB▼ 25.08%
images/icons/product-label.png0.21KB0.13KB▼ 35.07%
images/icons/coupon-label.png0.20KB0.13KB▼ 36.71%
images/icons/productrecord.png39.21KB18.08KB▼ 53.90%