80% rokt-ecommerce

Code Review | Rokt Ecommerce

WordPress plugin Rokt Ecommerce scored80%from 54 tests.

About plugin

  • Plugin page: rokt-ecommerce
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Sep 1, 2021
  • Latest release: Nov 14, 2022
  • Number of updates: 14
  • Update frequency: every 31.9 days
  • Top authors: roktecommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,399 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.58ms] Passed 4 tests

This is a short check of server-side resources used by Rokt Ecommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.16 ▼3.88
Dashboard /wp-admin3.31 ▲0.0148.00 ▼5.27
Posts /wp-admin/edit.php3.36 ▲0.0048.41 ▼2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.65 ▲0.74
Media Library /wp-admin/upload.php3.23 ▲0.0035.17 ▼2.86

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rokt Ecommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.69 ▲0.291.79 ▲0.2243.26 ▼1.02
Dashboard /wp-admin2,201 ▲245.63 ▲0.0196.07 ▲1.4045.32 ▼4.06
Posts /wp-admin/edit.php2,110 ▲132.00 ▲0.0239.42 ▼0.6535.45 ▼1.21
Add New Post /wp-admin/post-new.php1,535 ▼223.06 ▲4.95630.19 ▲9.7458.73 ▼13.23
Media Library /wp-admin/upload.php1,412 ▲154.20 ▲0.04102.55 ▲0.0444.88 ▲1.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/rokt-ecommerce/src/Includes/Helper.php+54
    Use of undefined constant ROKT_ECOMMERCE_PLUGIN_FILE - assumed 'ROKT_ECOMMERCE_PLUGIN_FILE' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: ecommerce, ads, checkout

rokt-ecommerce/rokt-ecommerce.php 92% from 13 tests

The principal PHP file in "Rokt Ecommerce" v. 1.1.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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 detected2,002 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP313654201,486
SVG805449
CSS10061
JSON1005
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.47
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods111
▷ Static methods2825.23%
▷ Public methods8980.18%
▷ Protected methods21.80%
▷ Private methods2018.02%
Functions10
▷ Named functions220.00%
▷ Anonymous functions880.00%
Constants17
▷ Global constants529.41%
▷ Class constants1270.59%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin