10% wsd-android-and-ios-for-woocommerce

Code Review | Android and iOS App plugin for WooCommerce by WSD

WordPress plugin Android and iOS App plugin for WooCommerce by WSD scored10%from 54 tests.

About plugin

  • Plugin page: wsd-android-and-i...
  • Plugin version: v.01...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Sep 17, 2018
  • Latest release: Dec 20, 2018
  • Number of updates: 16
  • Update frequency: every 6.1 days
  • Top authors: websystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /729 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wsd-android-and-ios-for-woocommerce/models/attachment.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; WSDAI_JSON_API_Attachment has a deprecated constructor

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.43ms] Passed 4 tests

Analyzing server-side resources used by Android and iOS App plugin for WooCommerce by WSD
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.96 ▼1.75
Dashboard /wp-admin3.32 ▲0.0250.76 ▲5.37
Posts /wp-admin/edit.php3.38 ▲0.0242.79 ▼4.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.78 ▼2.36
Media Library /wp-admin/upload.php3.25 ▲0.0232.43 ▼1.25
WSD Settings /wp-admin/options-general.php?page=json-api3.5136.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Android and iOS App plugin for WooCommerce by WSD
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.72 ▲0.351.87 ▲0.1344.48 ▲3.11
Dashboard /wp-admin2,199 ▲185.63 ▼0.0595.86 ▼1.9346.15 ▲6.07
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0235.97 ▼4.6230.42 ▼9.65
Add New Post /wp-admin/post-new.php1,531 ▲323.25 ▲0.36646.52 ▲26.6153.01 ▲1.99
Media Library /wp-admin/upload.php1,401 ▲44.19 ▲0.0594.81 ▼3.2841.56 ▼2.20
WSD Settings /wp-admin/options-general.php?page=json-api1,3712.0022.2131.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-auth.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-user.php on line 8
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-user.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-user.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-auth.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-user.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-user.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-user.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wsd-android-and-ios-for-woocommerce/json-api-auth.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wsd-android-and-ios-for-woocommerce/cart-rest-api-for-woocommerce.php:81

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
4 plugin tags: woocommerce mobile app, woocommerce mobile theme, woocommerce plugin, woocommerce app

wsd-android-and-ios-for-woocommerce/combined_plugin.php 77% from 13 tests

This is the main PHP file of "Android and iOS App plugin for WooCommerce by WSD" version v.01..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wsd-android-and-ios-for-woocommerce.php" instead of "combined_plugin.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "v.01...")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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,387 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP479935314,285
SVG111102

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity26.26
▷ Minimum class complexity2.00
▷ Maximum class complexity88.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods167
▷ Static methods31.80%
▷ Public methods15592.81%
▷ Protected methods105.99%
▷ Private methods21.20%
Functions18
▷ Named functions1372.22%
▷ Anonymous functions527.78%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin