10% wemalo-api

Code Review | Wemalo Connect

WordPress plugin Wemalo Connect scored10%from 54 tests.

About plugin

  • Plugin page: wemalo-api
  • Plugin version: 2.1.25
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2017
  • Latest release: Aug 24, 2023
  • Number of updates: 126
  • Update frequency: every 16.9 days
  • Top authors: wemalo (64.29%)patriceid (34.92%)soheylnazifi (2.38%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,741 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/wemalo-api/plugin/WemaloAPIInstaller.php+5
    require_once(wp-content/plugins/wemalo-api/plugin/../../woocommerce/packages/action-scheduler/action-scheduler.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.21ms] Passed 4 tests

Server-side resources used by Wemalo Connect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.09 ▲3.12
Dashboard /wp-admin3.31 ▼0.0444.07 ▼15.86
Posts /wp-admin/edit.php3.36 ▲0.0042.53 ▼4.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.74 ▼2.70
Media Library /wp-admin/upload.php3.23 ▲0.0034.40 ▲2.39

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wemalo Connect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.312.02 ▼0.1147.07 ▼2.91
Dashboard /wp-admin2,206 ▲154.84 ▼0.0799.61 ▼17.3338.23 ▼5.74
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0733.23 ▼3.2135.62 ▲1.13
Add New Post /wp-admin/post-new.php1,528 ▼523.35 ▲0.38628.91 ▼31.0749.56 ▼14.38
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0898.05 ▲0.0344.07 ▲0.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(wp-content/plugins/wemalo-api/plugin/../../woocommerce/packages/action-scheduler/action-scheduler.php): failed to open stream: No such file or directory in wp-content/plugins/wemalo-api/plugin/WemaloAPIInstaller.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wemalo-api/plugin/../../woocommerce/packages/action-scheduler/action-scheduler.php' (include_path='.:/usr/share/php') in wp-content/plugins/wemalo-api/plugin/WemaloAPIInstaller.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wemalo-api/WemaloAPI.php:32
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wemalo-api/plugin/../../woocommerce/packages/action-scheduler/action-scheduler.php' (include_path='.:/usr/share/php') in wp-content/plugins/wemalo-api/plugin/WemaloAPIInstaller.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/wemalo-api/plugin/../../woocommerce/packages/action-scheduler/action-scheduler.php): failed to open stream: No such file or directory in wp-content/plugins/wemalo-api/plugin/WemaloAPIInstaller.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/wemalo-api/pages/return_template.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wemalo-api/pages/wemaloplugin_configHTML.php:12

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 on the user side

Optimizations

Plugin configuration 93% 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: warehouse management, lagerverwaltung, fulfillment, wemalo

wemalo-api/WemaloAPI.php 85% from 13 tests

Analyzing the main PHP file in "Wemalo Connect" version 2.1.25
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wemalo-api.php" instead of "WemaloAPI.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.4.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin3,887 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP193531,2073,615
JavaScript1426152
CSS1160115
XML1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity32.50
▷ Minimum class complexity1.00
▷ Maximum class complexity149.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods197
▷ Static methods10.51%
▷ Public methods14875.13%
▷ Protected methods84.06%
▷ Private methods4120.81%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.69MB with 0.30MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png175.97KB75.70KB▼ 56.98%
images/wemalo.png1.01KB0.80KB▼ 20.89%
assets/icon-128x128.png7.80KB4.53KB▼ 41.94%
assets/banner-1544x500.png518.43KB236.71KB▼ 54.34%