10% wpecommerce-betaout

Code Review | WP eCommerce Betaout

WordPress plugin WP eCommerce Betaout scored10%from 54 tests.

About plugin

  • Plugin page: wpecommerce-betaout
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1.0
  • WordPress version: 6.3.1
  • First release: Jun 22, 2015
  • Latest release: Sep 26, 2016
  • Number of updates: 4
  • Update frequency: every 114.8 days
  • Top authors: Betaout (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /543 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/wpecommerce-betaout/index.php+302
    Undefined index: start_date

Server metrics [RAM: ▼1.12MB] [CPU: ▼54.35ms] Passed 4 tests

An overview of server-side resources used by WP eCommerce Betaout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6410.58 ▼35.95
Dashboard /wp-admin2.92 ▼0.4311.25 ▼52.94
Posts /wp-admin/edit.php2.92 ▼0.449.42 ▼38.86
Add New Post /wp-admin/post-new.php2.92 ▼2.979.27 ▼89.63
Media Library /wp-admin/upload.php2.92 ▼0.318.46 ▼26.25
Betaout Wp-e-commerce /wp-admin/admin.php?page=wpecommerce-betaout2.9211.19
Betaout Export CSV /wp-admin/admin.php?page=betaout-export2.929.50

Server storage [IO: ▲1.74MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

WP eCommerce Betaout: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,492 ▼25414.24 ▼0.350.53 ▼1.2619.00 ▼28.16
Dashboard /wp-admin2,224 ▲475.72 ▲0.0291.23 ▼3.3388.98 ▲48.42
Posts /wp-admin/edit.php2,129 ▲292.03 ▲0.0235.01 ▼4.7632.04 ▼2.34
Add New Post /wp-admin/post-new.php1,547 ▲223.32 ▼0.26670.21 ▲19.3476.62 ▲23.27
Media Library /wp-admin/upload.php1,423 ▲204.20 ▲0.0297.86 ▼0.4481.52 ▲39.93
Betaout Wp-e-commerce /wp-admin/admin.php?page=wpecommerce-betaout1,0472.0126.1379.71
Betaout Export CSV /wp-admin/admin.php?page=betaout-export8472.0124.3423.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wpecommerce-betaout/index.php+302
    Undefined index: start_date
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for 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=betaout-export
    • > Notice in wp-content/plugins/wpecommerce-betaout/index.php+302
    Undefined index: start_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=betaout-export
    • > Notice in wp-content/plugins/wpecommerce-betaout/index.php+302
    Undefined index: end_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=betaout-export
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method AmplifyLoginNew::amplifyinit() should not be called statically
    • > GET request to /wp-admin/admin.php?page=betaout-export
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method AmplifyLoginNew::exportcsv() should not be called statically

SRP 0% 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
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpecommerce-betaout/orderexport.php
    • > /wp-content/plugins/wpecommerce-betaout/includes/html/amplify.php
    • > /wp-content/plugins/wpecommerce-betaout/index.php
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include(./wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php on line 24
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-wp-xmlrpc-server.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php on line 27
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-wp-json-datetime.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php on line 28
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpecommerce-betaout/includes/html/amplify.php:68
    • > PHP Warning
      include_once(ABSPATHWPINC/class-wp-json-datetime.php): failed to open stream: No such file or directory in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php on line 28
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wpecommerce-betaout/index.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php:32
    • > PHP Warning
      include_once(ABSPATHWPINC/class-wp-json-server.php): failed to open stream: No such file or directory in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php on line 29
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpecommerce-betaout/lib/wp-json.php on line 27

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:
  • Screenshots: These screenshots do not have images: #1 (**Insights** -You can get an overview of the total number of orders & GMV earned in a selected time period. The page also shows you insights into total orders with a breakdown in terms of orders from regular customers, new customers & reactivated customers. At a quick glance, insights shows you the overall health of your ecommerce store, including a drill-down of the total no of customers, emails sent, total no of opens & clicks, bounces & unsubscribes. The customer grid is based on RFM score and is updated in real-time.), #2 (**Ready-to-Use Segmentation Ideas**-You can start segmenting your customers instantly with these ready-to-use segment ideas. Each segment gets activated with a single-click. With Betaout’s advanced segmentation capabilities, you can segment your customers based on any number of attributes.), #3 (**Customer Lifecycles**-This page gives you a complete drill-down of the total number of customers in each lifecycle, total no of orders (with & without offer), total GMV of the customers in each lifecycle. It also shows the total number of emails sent to each lifecycle with email analytics.), #4 (**Live Chat**-This is the view of an admin’s dashboard where the team members reply to the queries posted by your contacts & customers. On the left side of the screen are the users which are online, and on the right side of the screen you get a detailed information of the user in terms of the segments he belongs to, his lifecycle, RFM score, his predicted lifetime revenue based on his customer lifetime value (CLV) and total revenue earned from him. With a quick glance, you can also check out his most recent purchase. At a given time, you can check the complete discussion thread with a particular contact/customer.), #5 (**User profile**-This page give you a single view of each customer with his demographic details, activity and event details updated in real-time. This page gives you deep insights into a customer’s behavior and his purchasing habits, the campaigns he has touched across different marketing channels, including the most performing campaigns throughout his customer journey. This 360 degree customer view gives you detailed insights into the best days and time to connect with him based on the email tracking.)
Please take inspiration from this readme.txt

wpecommerce-betaout/index.php 92% from 13 tests

The primary PHP file in "WP eCommerce Betaout" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpecommerce-betaout.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,218 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP197901,0142,821
CSS1551393
JavaScript1104

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity36.55
▷ Minimum class complexity1.00
▷ Maximum class complexity203.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods113
▷ Static methods54.42%
▷ Public methods9483.19%
▷ Protected methods1815.93%
▷ Private methods10.88%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants527.78%
▷ Class constants1372.22%
▷ Public constants13100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 PNG files occupy 1.18MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/plugin-logo.png2.11KB0.82KB▼ 61.21%
images/engage-app.png4.65KB1.63KB▼ 64.98%
images/db-1.png6.14KB2.14KB▼ 65.24%
screenshot-3.png159.11KB56.84KB▼ 64.28%
images/icon.png0.73KB0.78KB0.00%