78% woocommerce-betaout

Code Review | Woocommerce Betaout

WordPress plugin Woocommerce Betaout scored 78% from 54 tests.

About plugin

  • Plugin page: woocommerce-betaout
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1.0
  • WordPress version: 6.3.1
  • First release: Dec 30, 2014
  • Latest release: Nov 18, 2017
  • Number of updates: 62
  • Update frequency: every 17.1 days
  • Top authors: Betaout (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.35ms] Passed 4 tests

Server-side resources used by Woocommerce Betaout
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2840.49 ▼1.89
Dashboard /wp-admin3.43 ▲0.1345.52 ▼6.13
Posts /wp-admin/edit.php3.48 ▲0.1346.28 ▼2.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0798.93 ▲16.42
Media Library /wp-admin/upload.php3.29 ▲0.0637.87 ▲1.17

Server storage [IO: ▲1.75MB] [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: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Betaout
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲15713.56 ▼1.098.67 ▲6.8043.55 ▼7.16
Dashboard /wp-admin2,224 ▲364.87 ▼0.0696.65 ▼20.8282.60 ▲36.14
Posts /wp-admin/edit.php2,101 ▲122.00 ▲0.0138.59 ▲2.4833.19 ▼2.35
Add New Post /wp-admin/post-new.php1,536 ▲218.34 ▼4.72695.02 ▲15.7378.84 ▲12.73
Media Library /wp-admin/upload.php1,403 ▲154.11 ▼0.1396.31 ▼13.2372.62 ▲24.06

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woocommerce-betaout/includes/html/amplify.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woocommerce-betaout/includes/html/sociallogin.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'BetaoutSerializable' not found in wp-content/plugins/woocommerce-betaout/lib/betaout-wc-json-responseinterface.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-betaout/lib/betaout-wc-json-server.php on line 10
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-betaout/index.php on line 24
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-betaout/index.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woocommerce-betaout/includes/html/socialsharing.php:20
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/admin.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-betaout/lib/betaout-wc-json-server.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WC_BETAOUT_API_Resource' not found in wp-content/plugins/woocommerce-betaout/lib/betaout-wc-json-product.php:3
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-betaout/index.php on line 24
    • > PHP Fatal error
      Uncaught Error: Interface 'WC_BETAOUT_ResponseInterface' not found in wp-content/plugins/woocommerce-betaout/lib/betaout-wc-json-response.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (**Amplify** -Feedback widgets, contact us forms etc are seen by your users as one-way conversations. Users after filling up a form are not even sure if they will receive a reply. But with Amplify Connect these feedbacks are turned into conversations and stored in a personalised user-inbox for every user.), #2 (**Pro-active User Engagement**-Less than 0.5% users on any site submits a feedback or fill up a contact form. So instead of waiting for users to contact you, why not greet them with a custom message when then pay you a visit.), #3 (**Easy and yet powerful customer support**-Easily assign these conversations and support requests to team members. Use email forwarding to centralised your support queries via Amplify Connect.), #4 (**additional marketing channel**-An additional marketing channel)
The official readme.txt might help

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

"Woocommerce Betaout" version 3.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-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
Good job! No executable or dangerous file extensions detected3,438 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP177578643,006
CSS1551393
JavaScript212439

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity30.92
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods138
▷ Static methods107.25%
▷ Public methods11381.88%
▷ Protected methods1611.59%
▷ Private methods96.52%
Functions14
▷ Named functions14100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 1.18MB with 0.83MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/large_bracket.png4.38KB1.07KB▼ 75.63%
images/com-app.png4.93KB1.73KB▼ 64.82%
images/check.png3.20KB0.42KB▼ 86.71%
images/Users.png5.40KB2.11KB▼ 60.88%
screenshot-2.png195.27KB70.00KB▼ 64.15%