10% snapplify-e-commerce

Code Review | Snapplify E-Commerce

WordPress plugin Snapplify E-Commerce scored10%from 54 tests.

About plugin

  • Plugin page: snapplify-e-commerce
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Oct 17, 2022
  • Latest release: May 30, 2023
  • Number of updates: 32
  • Update frequency: every 7.1 days
  • Top authors: snapplify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /789 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/snapplify-e-commerce/snapplify-ecommerce.php+67
    require_once(wp-content/plugins/snapplify-e-commerce/../woocommerce/packages/action-scheduler/action-scheduler.php): failed to open stream: No such file or directory

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

Server-side resources used by Snapplify E-Commerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.70 ▼1.07
Dashboard /wp-admin3.31 ▲0.0046.63 ▼0.91
Posts /wp-admin/edit.php3.36 ▲0.0051.27 ▼3.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.22 ▼5.34
Media Library /wp-admin/upload.php3.23 ▲0.0037.14 ▼1.13

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Snapplify E-Commerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.861.56 ▼0.1841.11 ▼2.79
Dashboard /wp-admin2,209 ▲215.92 ▲0.84101.55 ▼12.1342.68 ▲0.37
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0240.83 ▲0.5238.58 ▲0.29
Add New Post /wp-admin/post-new.php1,533 ▲1323.20 ▲0.01599.12 ▼103.2254.84 ▼2.79
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0496.66 ▼17.5943.03 ▼4.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/snapplify-e-commerce/public/partials/snapplify-ecommerce-public-display.php
    • > /wp-content/plugins/snapplify-e-commerce/admin/partials/snapplify-ecommerce-admin-display.php
  • 38× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Uri\\Retrievers\\AbstractRetriever' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/PredefinedArray.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Constraints\\Constraint' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/StringConstraint.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'JsonSchema\\UriRetrieverInterface' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriRetriever.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'JsonSchema\\UriResolverInterface' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Constraints\\Constraint' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Constraints\\Constraint' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Exception\\RuntimeException' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/ValidationException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Pipeline\\PipelineBuilderInterface' not found in wp-content/plugins/snapplify-e-commerce/vendor/league/pipeline/src/PipelineBuilder.php:6
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/demo/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/demo/demo.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Constraints\\BaseConstraint' not found in wp-content/plugins/snapplify-e-commerce/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: woocommerce, snapplify, products

snapplify-e-commerce/snapplify-ecommerce.php 85% from 13 tests

"Snapplify E-Commerce" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("snapplify-e-commerce.php" instead of "snapplify-ecommerce.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/snapplify-e-commerce/vendor/bin/validate-json.bat
6,381 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP841,1692,5005,090
JSON9310777
Markdown6930321
HTML18193
PO File1202453
XML12024
YAML32312
JavaScript24546
DOS Batch1005
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.32
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces13
Interfaces11
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods310
▷ Static methods4815.48%
▷ Public methods23776.45%
▷ Protected methods3511.29%
▷ Private methods3812.26%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants23
▷ Global constants14.35%
▷ Class constants2295.65%
▷ Public constants22100.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
No PNG files were detected