68% stackcommerce-deal-feed

Code Review | StackCommerce Deal Feed

WordPress plugin StackCommerce Deal Feed scored68%from 54 tests.

About plugin

  • Plugin page: stackcommerce-dea...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Nov 24, 2015
  • Latest release: Apr 8, 2017
  • Number of updates: 46
  • Update frequency: every 11.0 days
  • Top authors: stackcommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,934 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
Installer ran successfully

Server metrics [RAM: ▼0.79MB] [CPU: ▼45.62ms] Passed 4 tests

Analyzing server-side resources used by StackCommerce Deal Feed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0927.37 ▼15.23
Dashboard /wp-admin3.17 ▼0.1828.51 ▼39.52
Posts /wp-admin/edit.php3.17 ▼0.1930.33 ▼22.85
Add New Post /wp-admin/post-new.php3.17 ▼2.7228.99 ▼104.89
Media Library /wp-admin/upload.php3.17 ▼0.0623.90 ▼13.50
Shortcode Settings /wp-admin/admin.php?page=stackCommerce_shortcode_settings3.1731.50
General Settings /wp-admin/admin.php?page=stackCommerce_general_settings3.1725.31
Styling settings /wp-admin/admin.php?page=stackCommerce_style_settings3.1728.29

Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/stackcommerce-deal-feed/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_stackcommerce_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by StackCommerce Deal Feed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲11413.71 ▼0.651.90 ▲0.0944.30 ▼1.30
Dashboard /wp-admin2,264 ▲615.16 ▼0.74112.15 ▼6.5084.86 ▲34.73
Posts /wp-admin/edit.php2,157 ▲602.31 ▲0.3241.53 ▲0.7137.81 ▼0.11
Add New Post /wp-admin/post-new.php1,575 ▲4923.18 ▲5.55604.65 ▼87.0735.84 ▼8.30
Media Library /wp-admin/upload.php1,450 ▲534.38 ▲0.2495.64 ▼19.7365.40 ▲14.03
Shortcode Settings /wp-admin/admin.php?page=stackCommerce_shortcode_settings9131.9828.6831.48
General Settings /wp-admin/admin.php?page=stackCommerce_general_settings8951.9526.8529.27
Styling settings /wp-admin/admin.php?page=stackCommerce_style_settings1,5112.8359.8529.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/stackcommerce-deal-feed/wp/includes/admin-settings.php+68
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_stackcommerce_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stackCommerce_style_settings
    • > Notice in wp-content/plugins/stackcommerce-deal-feed/wp/includes/partials/part-style-settings.php+4
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=stackCommerce_style_settings
    • > Notice in wp-content/plugins/stackcommerce-deal-feed/wp/includes/partials/part-style-settings.php+8
    Undefined index: button_text_color
    • > GET request to /wp-admin/admin.php?page=stackCommerce_style_settings
    • > Notice in wp-content/plugins/stackcommerce-deal-feed/wp/includes/partials/part-style-settings.php+12
    Undefined index: box_background
    • > GET request to /wp-admin/admin.php?page=stackCommerce_style_settings
    • > Notice in wp-content/plugins/stackcommerce-deal-feed/wp/includes/partials/part-style-settings.php+16
    Undefined index: ribon_background
    • > GET request to /wp-admin/admin.php?page=stackCommerce_style_settings
    • > Notice in wp-content/plugins/stackcommerce-deal-feed/wp/includes/partials/part-style-settings.php+124
    Undefined index: ribon_text
    • > GET request to /wp-admin/admin.php?page=stackCommerce_style_settings
    • > Notice in wp-content/plugins/stackcommerce-deal-feed/wp/includes/partials/part-style-settings.php+143
    Undefined index: custom_css

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/stackcommerce-deal-feed/wp/includes/class-stackCommerce-widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/stackcommerce-deal-feed/stackCommerce.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/stackcommerce-deal-feed/wp/includes/class-stackCommerce-shortcode.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stackcommerce-deal-feed/wp/includes/display-functions.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stackcommerce-deal-feed/wp/includes/admin-settings.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === stackcommerce-deal-feed === )
You can look at the official readme.txt

stackcommerce-deal-feed/stackCommerce.php 92% from 13 tests

The main file in "StackCommerce Deal Feed" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("stackcommerce-deal-feed.php" instead of "stackCommerce.php")

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
Good job! No executable or dangerous file extensions detected2,136 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP919142965
CSS304584
LESS3676511
JavaScript120576

PHP code Passed 2 tests

A short review of 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.18
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity9.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
wp/includes/img/SC_logoIcon.png2.95KB0.46KB▼ 84.32%