78% flash-sale-product-wc-wpshare247

Code Review | Flash Sale Product for WooCommerce - WPSHARE247

WordPress plugin Flash Sale Product for WooCommerce - WPSHARE247 scored78%from 54 tests.

About plugin

  • Plugin page: flash-sale-produc...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2023
  • Latest release: Mar 24, 2023
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: website366 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /580 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼7.23ms] Passed 4 tests

This is a short check of server-side resources used by Flash Sale Product for WooCommerce - WPSHARE247
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.93 ▲3.87
Dashboard /wp-admin3.35 ▲0.0150.29 ▼3.98
Posts /wp-admin/edit.php3.47 ▲0.1142.26 ▼8.68
Add New Post /wp-admin/post-new.php5.19 ▼0.7061.27 ▼18.34
Media Library /wp-admin/upload.php3.28 ▲0.0533.46 ▲2.08
Flash sale /wp-admin/admin.php?page=ws247-fspw-options3.2633.00

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flash Sale Product for WooCommerce - WPSHARE247
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▲0.071.68 ▲0.1243.59 ▲6.73
Dashboard /wp-admin2,198 ▲285.62 ▼0.0596.50 ▼9.6443.64 ▲1.66
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0134.81 ▼5.6835.27 ▼1.86
Add New Post /wp-admin/post-new.php1,535 ▼018.41 ▲0.39634.39 ▼3.5664.97 ▼16.58
Media Library /wp-admin/upload.php1,400 ▼34.37 ▲0.06100.97 ▲1.3845.66 ▲0.60
Flash sale /wp-admin/admin.php?page=ws247-fspw-options9031.9923.5920.87

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ws247-fspw-options
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WS247_FSPW_SETTING_PAGE_SLUG - assumed 'WS247_FSPW_SETTING_PAGE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/flash-sale-product-wc-wpshare247/inc/class.setting.page.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flash-sale-product-wc-wpshare247/inc/metabox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flash-sale-product-wc-wpshare247/inc/theme_functions.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/flash-sale-product-wc-wpshare247/inc/option-form-template.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/flash-sale-product-wc-wpshare247/inc/tabs/tab_pro_general.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flash-sale-product-wc-wpshare247/inc/class.setting.page.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/flash-sale-product-wc-wpshare247/inc/define.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === flash-sale-product-wc-wpshare247 === )
The official readme.txt is a good inspiration

flash-sale-product-wc-wpshare247/flash-sale-product-wc-wpshare247.php 92% from 13 tests

"Flash Sale Product for WooCommerce - WPSHARE247" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin390 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP85931301
CSS11044
PO File19133
SVG10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.50
▷ Minimum class complexity4.00
▷ Maximum class complexity11.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin