62% upela-e-commerce-connector

Code Review | Upela Connector for WordPress

WordPress plugin Upela Connector for WordPress scored62%from 54 tests.

About plugin

  • Plugin page: upela-e-commerce-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Feb 3, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: babbou (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /1,497 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Upela Connector for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.73 ▲0.11
Dashboard /wp-admin3.33 ▲0.0253.61 ▼2.26
Posts /wp-admin/edit.php3.38 ▲0.0250.58 ▼1.28
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.05 ▼13.45
Media Library /wp-admin/upload.php3.25 ▲0.0236.67 ▲2.72
Settings /wp-admin/admin.php?page=upela-wordpress3.3532.43
Set Up /wp-admin/admin.php?page=set-up3.2133.97

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 52 new files
Database: 1 new table, 6 new options
New tables
wp_upela_connector
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Upela Connector for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.65 ▼0.721.89 ▲0.2543.32 ▲2.75
Dashboard /wp-admin2,220 ▲295.88 ▼0.16100.76 ▼0.2871.88 ▲25.83
Posts /wp-admin/edit.php2,118 ▲262.12 ▲0.1233.53 ▼8.1634.28 ▼1.68
Add New Post /wp-admin/post-new.php1,536 ▲117.63 ▼5.51737.65 ▲116.9558.17 ▲5.82
Media Library /wp-admin/upload.php1,414 ▲234.17 ▼0.2297.36 ▼2.0477.47 ▲34.15
Settings /wp-admin/admin.php?page=upela-wordpress2,2532.0227.7239.52
Set Up /wp-admin/admin.php?page=set-up8252.1324.8428.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_upela_connector
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upela-wordpress
    • > Notice in wp-content/plugins/upela-e-commerce-connector/model/Software.class.php+17
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/upela-e-commerce-connector/view/status.php
    • > /wp-content/plugins/upela-e-commerce-connector/view/error.php
    • > /wp-content/plugins/upela-e-commerce-connector/view/statusSuccess.php
    • > /wp-content/plugins/upela-e-commerce-connector/view/trackingSuccess.php
  • 37× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'PLUGIN_PATH_UPELAWORDPRESSfunctions/functions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/upela-e-commerce-connector/control/controlAdmin.php on line 5
    • > PHP Notice
      Undefined variable: user in wp-content/plugins/upela-e-commerce-connector/view/store.php on line 5
    • > PHP Warning
      include_once(PLUGIN_PATH_UPELAWORDPRESSmodel/User.class.php): failed to open stream: No such file or directory in wp-content/plugins/upela-e-commerce-connector/control/controlAdmin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/upela-e-commerce-connector/view/upela_admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function getStatus() on null in wp-content/plugins/upela-e-commerce-connector/view/statusCode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/upela-e-commerce-connector/view/setUp.php:2
    • > PHP Notice
      Undefined index: order in wp-content/plugins/upela-e-commerce-connector/view/status.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'PLUGIN_PATH_UPELAWORDPRESSmodel/Software.class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/upela-e-commerce-connector/control/controlAdmin.php on line 4
    • > PHP Warning
      Use of undefined constant PLUGIN_PATH_UPELAWORDPRESS - assumed 'PLUGIN_PATH_UPELAWORDPRESS' (this will throw an Error in a future version of PHP) in wp-content/plugins/upela-e-commerce-connector/control/controlAdmin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'User' not found in wp-content/plugins/upela-e-commerce-connector/control/controlAdmin.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

upela-e-commerce-connector/controler.php 92% from 13 tests

The entry point to "Upela Connector for WordPress" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("upela-e-commerce-connector.php" instead of "controler.php")

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
Success! There were no dangerous files found in this plugin4,443 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP365812874,312
PO File1385393
CSS251137
JavaScript1061

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity36.80
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods151
▷ Static methods00.00%
▷ Public methods9965.56%
▷ Protected methods5234.44%
▷ Private methods00.00%
Functions87
▷ Named functions87100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.49MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo.png0.64KB0.69KB0.00%
img/image02.png145.70KB83.69KB▼ 42.56%
img/image03.png206.86KB127.89KB▼ 38.18%
img/image01.png147.64KB83.72KB▼ 43.29%
img/icon.png0.64KB0.69KB0.00%