10% appeto-woocommerce

Code Review | Appeto

WordPress plugin Appeto scored10%from 54 tests.

About plugin

  • Plugin page: appeto-woocommerce
  • Plugin version: 4.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Jul 25, 2016
  • Latest release: Nov 17, 2021
  • Number of updates: 25
  • Update frequency: every 77.6 days
  • Top authors: appeto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /10,587 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/post.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Post has a deprecated constructor

Server metrics [RAM: ▼1.56MB] [CPU: ▼53.33ms] Passed 4 tests

This is a short check of server-side resources used by Appeto
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.43 ▼1.037.91 ▼33.75
Dashboard /wp-admin2.46 ▼0.8910.36 ▼53.06
Posts /wp-admin/edit.php2.46 ▼0.9010.07 ▼38.45
Add New Post /wp-admin/post-new.php2.46 ▼3.4310.40 ▼88.07
Media Library /wp-admin/upload.php2.46 ▼0.7710.96 ▼22.85
تنظیمات /wp-admin/admin.php?page=appeto-settings2.469.68
JSON API /wp-admin/options-general.php?page=json-api2.4610.32
ووکامرس /wp-admin/admin.php?page=appeto-woo2.4611.28
حساب کاربری وردپرس /wp-admin/admin.php?page=appeto-auth-settings2.4612.66
دسترسی ها /wp-admin/admin.php?page=appeto-wp-cors2.4610.14
CORS /wp-admin/options-general.php?page=wp-cors2.4611.25
ارسال نوتیفیکیشن /wp-admin/admin.php?page=appeto-push2.469.97
ووکامرس شبکه ای /wp-admin/admin.php?page=appeto-network-woo2.4610.08
وردپرس /wp-admin/admin.php?page=appeto-json-api2.4610.65

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 136 new files
Database: no new tables, 14 new options
New WordPress options
appeto_secure_key_woo
widget_recent-comments
theysaidso_admin_options
appeto_woo_signup_form_city
appeto_woo_signup_form_mobile
widget_recent-posts
widget_theysaidso_widget
db_upgraded
appeto_woo_signup_form_address2
appeto_woo_signup_form_address
...

Browser metrics Passed 4 tests

An overview of browser requirements for Appeto
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,021 ▲27515.42 ▲1.031.59 ▼0.2636.35 ▼7.26
Dashboard /wp-admin2,427 ▲2397.23 ▲2.35134.41 ▲21.5389.40 ▲43.47
Posts /wp-admin/edit.php2,336 ▲2504.02 ▲2.0252.66 ▲12.7276.90 ▲42.36
Add New Post /wp-admin/post-new.php6,529 ▲4,99928.26 ▲10.09902.77 ▲289.1654.70 ▼1.00
Media Library /wp-admin/upload.php1,463 ▲724.79 ▲0.5687.10 ▼12.5692.65 ▲48.41
تنظیمات /wp-admin/admin.php?page=appeto-settings1,0973.6845.29101.66
JSON API /wp-admin/options-general.php?page=json-api1,4193.6644.1065.65
ووکامرس /wp-admin/admin.php?page=appeto-woo7592.1210.6634.58
حساب کاربری وردپرس /wp-admin/admin.php?page=appeto-auth-settings1,0313.6541.7877.97
دسترسی ها /wp-admin/admin.php?page=appeto-wp-cors1,7644.7051.8545.36
CORS /wp-admin/options-general.php?page=wp-cors1,0543.6442.0981.47
ارسال نوتیفیکیشن /wp-admin/admin.php?page=appeto-push1,1243.6443.4899.24
ووکامرس شبکه ای /wp-admin/admin.php?page=appeto-network-woo1,0323.6540.8085.24
وردپرس /wp-admin/admin.php?page=appeto-json-api2,1234.7548.9289.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/post.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Post has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=appeto-json-api
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/post.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Post has a deprecated constructor
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=appeto-json-api
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/comment.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Comment has a deprecated constructor
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=appeto-json-api
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/category.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Category has a deprecated constructor
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=appeto-json-api
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/tag.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Tag has a deprecated constructor
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=appeto-json-api
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/author.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Author has a deprecated constructor
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=appeto-json-api
    • > Deprecated in wp-content/plugins/appeto-woocommerce/json-api/models/attachment.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; JSON_API_Attachment has a deprecated constructor

SRP 0% 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
Almost there! Just fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/appeto-woocommerce/api/views/v2/categories.php
    • > /wp-content/plugins/appeto-woocommerce/api/views/categories.php
    • > /wp-content/plugins/appeto-woocommerce/api/views/product.php
    • > /wp-content/plugins/appeto-woocommerce/views/wooNetwork.php
    • > /wp-content/plugins/appeto-woocommerce/views/auth.php
  • 117× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: extra in wp-content/plugins/appeto-woocommerce/api/views/category.php on line 2
    • > PHP Notice
      Undefined variable: extra in wp-content/plugins/appeto-woocommerce/api/views/v2/product.php on line 17
    • > PHP Notice
      Undefined variable: extra in wp-content/plugins/appeto-woocommerce/api/views/search.php on line 1
    • > PHP Notice
      Trying to get property 'content_classes' of non-object in wp-content/plugins/appeto-woocommerce/api/views/product.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Client_Exception' not found in wp-content/plugins/appeto-woocommerce/api/lib/woocommerce-api/exceptions/class-wc-api-client-http-exception.php:9
    • > PHP Notice
      Trying to get property 'content_classes' of non-object in wp-content/plugins/appeto-woocommerce/api/views/search.php on line 3
    • > PHP Notice
      Undefined variable: extra in wp-content/plugins/appeto-woocommerce/api/views/v2/network-search.php on line 7
    • > PHP Notice
      Undefined variable: extra in wp-content/plugins/appeto-woocommerce/api/views/v2/product.php on line 17
    • > PHP Notice
      Undefined variable: extra in wp-content/plugins/appeto-woocommerce/api/views/product.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Client_Resource' not found in wp-content/plugins/appeto-woocommerce/api/lib/woocommerce-api/resources/class-wc-api-client-resource-customers.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=appeto-woo
    • > Network (severe)
    wp-admin/admin.php?page=wc-settings&tab=settings_tab_appeto - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === appeto-woocommerce === )
You can take inspiration from this readme.txt

appeto-woocommerce/index.php 85% from 13 tests

The primary PHP file in "Appeto" version 4.0.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("appeto-woocommerce.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)

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
Good job! No executable or dangerous file extensions detected30,442 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript718914912,915
PHP891,4971,9799,358
SVG2112,773
JSON4002,654
CSS4787291,889
HTML23511365
LESS33968308
Markdown3450154
Ant15020
YAML1106

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity21.09
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes12.22%
▷ Concrete classes4497.78%
▷ Final classes00.00%
Methods314
▷ Static methods3410.83%
▷ Public methods28891.72%
▷ Protected methods165.10%
▷ Private methods103.18%
Functions42
▷ Named functions3583.33%
▷ Anonymous functions716.67%
Constants22
▷ Global constants2090.91%
▷ Class constants29.09%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/appeto.png1.60KB0.94KB▼ 41.26%
assets/img/no_image.png15.67KB6.96KB▼ 55.59%
json-api/screenshot-1.png22.90KB8.29KB▼ 63.82%
assets/fontawesome-iconpicker/extension/icon-128.png12.55KB5.02KB▼ 60.02%
assets/fontawesome-iconpicker/extension/icon.png1.48KB0.74KB▼ 49.80%