10% sales-popup-for-woocommerce

Code Review | Sales Popup for Woocommerce

WordPress plugin Sales Popup for Woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: sales-popup-for-w...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2019
  • Latest release: Jul 11, 2021
  • Number of updates: 7
  • Update frequency: every 92.3 days
  • Top authors: taxarpro (85.71%)DanielRiera (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /667 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/sales-popup-for-woocommerce/includes/class.api.php+65
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼58.60ms] Passed 4 tests

This is a short check of server-side resources used by Sales Popup for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.78 ▼50.12
Dashboard /wp-admin2.10 ▼1.2111.47 ▼52.07
Posts /wp-admin/edit.php2.10 ▼1.268.21 ▼45.59
Add New Post /wp-admin/post-new.php2.10 ▼3.797.21 ▼86.60
Media Library /wp-admin/upload.php2.10 ▼1.138.04 ▼30.15
Sales Popups /wp-admin/admin.php?page=wtsales-options2.1010.23

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

Input-output and database impact of this plugin
Just a few items left to fix
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/sales-popup-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sales Popup for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8913.60 ▼0.774.12 ▲2.4139.66 ▼6.31
Dashboard /wp-admin2,256 ▲535.81 ▼0.05100.95 ▼14.9538.82 ▼4.04
Posts /wp-admin/edit.php2,099 ▼12.00 ▲0.0136.72 ▼3.1235.43 ▼0.71
Add New Post /wp-admin/post-new.php1,528 ▲223.39 ▲5.66683.40 ▲22.3958.45 ▲0.52
Media Library /wp-admin/upload.php1,402 ▲24.20 ▲0.0498.73 ▼9.0742.32 ▼3.88
Sales Popups /wp-admin/admin.php?page=wtsales-options1,4232.1628.3142.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/sales-popup-for-woocommerce/includes/class.api.php+65
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtsales-options
    • > Deprecated in wp-content/plugins/sales-popup-for-woocommerce/includes/class.api.php+106
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/admin.php?page=wtsales-options
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: increase, sales, woocommerce

sales-popup-for-woocommerce/sales-popup-for-woocommerce.php 92% from 13 tests

The main PHP script in "Sales Popup for Woocommerce" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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,120 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS3564123,163
PHP57312735
PO File16667161
JavaScript14161

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity21.50
▷ Minimum class complexity14.00
▷ Maximum class complexity29.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1361.90%
▷ Protected methods00.00%
▷ Private methods838.10%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wordpress-org/banner-1880x609.png37.08KB13.95KB▼ 62.38%
wordpress-org/icon-256x256.png3.16KB1.73KB▼ 45.31%
wordpress-org/icon-128x128.png1.60KB0.93KB▼ 41.50%
wordpress-org/banner-772x250.png13.59KB5.30KB▼ 61.01%
wordpress-org/banner-1544x500.png30.11KB11.52KB▼ 61.74%