74% datafeedr-comparison-sets

Code Review | Datafeedr Comparison Sets

WordPress plugin Datafeedr Comparison Sets scored74%from 54 tests.

About plugin

  • Plugin page: datafeedr-compari...
  • Plugin version: 0.9.70
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Nov 10, 2023
  • Number of updates: 154
  • Update frequency: every 18.0 days
  • Top authors: datafeedr.com (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /84,842 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.77MB] [CPU: ▼9.61ms] Passed 4 tests

Server-side resources used by Datafeedr Comparison Sets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.25 ▲0.7947.38 ▲1.74
Dashboard /wp-admin4.09 ▲0.7465.29 ▼3.96
Posts /wp-admin/edit.php4.14 ▲0.7853.81 ▲5.34
Add New Post /wp-admin/post-new.php6.67 ▲0.7892.99 ▼33.21
Media Library /wp-admin/upload.php4.01 ▲0.7839.79 ▼3.02
null /wp-admin/admin.php?page=dfrcs_add_products3.9237.56
Comparison Sets /wp-admin/admin.php?page=dfrcs_options3.9154.51

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 28 new files
Database: 1 new table, 8 new options
New tables
wp_dfrcs_compsets
New WordPress options
dfrcs_options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
dfrcs_version

Browser metrics Passed 4 tests

An overview of browser requirements for Datafeedr Comparison Sets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16313.79 ▼0.6110.61 ▲8.6972.19 ▲26.55
Dashboard /wp-admin2,197 ▲205.61 ▼0.06112.97 ▼0.9854.47 ▲5.30
Posts /wp-admin/edit.php2,114 ▲112.01 ▲0.0541.28 ▼5.0536.76 ▼0.67
Add New Post /wp-admin/post-new.php1,537 ▲1122.97 ▼0.09641.14 ▼58.8550.40 ▼8.27
Media Library /wp-admin/upload.php1,411 ▲114.27 ▲0.06100.34 ▼20.2841.65 ▼9.37
null /wp-admin/admin.php?page=dfrcs_add_products7511.9923.1010.19
Comparison Sets /wp-admin/admin.php?page=dfrcs_options1,4751.6848.0757.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_dfrcs_compsets
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • dfrcs_options
    • db_upgraded
    • widget_recent-posts
    • dfrcs_version
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/datafeedr-comparison-sets/includes/functions.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/datafeedr-comparison-sets/integrations/woocommerce.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function meets_min_num_product_requirement() on null in wp-content/plugins/datafeedr-comparison-sets/templates/default.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tested up to: Invalid plugin version format
The official readme.txt might help

datafeedr-comparison-sets/datafeedr-comparison-sets.php Passed 13 tests

"Datafeedr Comparison Sets" version 0.9.70's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
97 characters long description:
Automatically create price comparison sets for your WooCommerce products or by using a shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin4,488 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,0461,0913,750
CSS210315533
JavaScript26014205

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 complexity61.33
▷ Minimum class complexity17.00
▷ Maximum class complexity147.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods77
▷ Static methods00.00%
▷ Public methods2228.57%
▷ Protected methods810.39%
▷ Private methods4761.04%
Functions123
▷ Named functions11593.50%
▷ Anonymous functions86.50%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin