10% adec-app

Code Review | ADEC (Advance Dynamic E-Commerce)

WordPress plugin ADEC (Advance Dynamic E-Commerce) scored 10% from 54 tests.

About plugin

  • Plugin page: adec-app
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 5.9.2
  • First release: Nov 2, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 22
  • Update frequency: every 2.5 days
  • Top authors: mannit (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 783 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/class.redux_filesystem.php+29
    Creating default object from empty value

Server metrics [RAM: ▼2.43MB] [CPU: ▼354.62ms] Passed 4 tests

Analyzing server-side resources used by ADEC (Advance Dynamic E-Commerce)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.93 ▼1.585.73 ▼45.14
Dashboard /wp-admin1.95 ▼1.458.46 ▼26.45
Posts /wp-admin/edit.php1.95 ▼1.696.05 ▼39.04
Add New Post /wp-admin/post-new.php1.95 ▼5.025.04 ▼1,307.83
Media Library /wp-admin/upload.php1.95 ▼1.345.81 ▼20.46
Store Configuration /wp-admin/admin.php?page=ADECPlugin&tab=11.956.31
Options Object /wp-admin/admin.php?page=ADECPlugin&tab=31.956.44

Server storage [IO: ▲11.75MB] [DB: ▲0.06MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 725 new files
Database: no new tables, 2 new options
New WordPress options
obs_mobile_store-transients
redux_version_upgraded_from

Browser metrics Passed 4 tests

ADEC (Advance Dynamic E-Commerce): an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,107 ▲35317.77 ▲2.529.65 ▲3.892.49 ▼0.01
Dashboard /wp-admin3,104 ▲2437.63 ▲1.48135.05 ▼3.71192.98 ▲30.58
Posts /wp-admin/edit.php2,820 ▲1294.33 ▲1.0979.45 ▲16.89169.48 ▲22.18
Add New Post /wp-admin/post-new.php1,666 ▲1117.99 ▼2.90414.18 ▼14.99188.82 ▼9.60
Media Library /wp-admin/upload.php1,824 ▲1306.88 ▲1.36134.45 ▼8.25205.58 ▼14.82
Store Configuration /wp-admin/admin.php?page=ADECPlugin&tab=11,6154.6497.66200.60
Options Object /wp-admin/admin.php?page=ADECPlugin&tab=31,5865.0891.24172.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/class.redux_filesystem.php+29
    Creating default object from empty value
  • Zombie WordPress options detected upon uninstall: 2 options
    • redux_version_upgraded_from
    • obs_mobile_store-transients

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Warning in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/class.redux_filesystem.php+29
    Creating default object from empty value
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Notice in wp-content/plugins/adec-app/redux-framework/sample/config.php+307
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Notice in wp-content/plugins/adec-app/redux-framework/sample/config.php+319
    Trying to get property 'section_one' of non-object
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Notice in wp-content/plugins/adec-app/redux-framework/sample/config.php+321
    Trying to get property 'permission' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Notice in wp-content/plugins/adec-app/redux-framework/sample/config.php+320
    Trying to get property 'section_two' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Notice in wp-content/plugins/adec-app/redux-framework/sample/config.php+321
    Trying to get property 'section_three' of non-object

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
Please take a closer look at the following
  • 30× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_welcome_text.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_contact_us.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_google_analytics.php
    • > /wp-content/plugins/adec-app/public/partials/plugin-name-public-display.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_check_permission.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_store_settings.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_slider_permission.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_layout_select.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_section_one.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_banner_permission.php
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Panel' not found in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_panel.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/themecheck/checks/full_package.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/adec-app/redux-framework/ReduxCore/templates/panel/header.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/adec-app/redux-framework/ReduxCore/templates/panel/footer.tpl.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/welcome/views/support.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_action() in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/class.thirdparty.fixes.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_section.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_control.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/adec-app/redux-framework/ReduxCore/templates/panel/header_stickybar.tpl.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/adec-app/redux-framework/ReduxCore/templates/panel/menu_container.tpl.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Javascript (severe) in unknown
    /wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/extensions/options_object/options_object/field_options_object.js?ver=4.0 5:4 Uncaught ReferenceError: redux is not defined
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=1
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=ADECPlugin&tab=1 0:0 Uncaught pe: initMap is not a function
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=ADECPlugin&tab=3 0:0 Uncaught pe: initMap is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: wordpress mobile app, mobile app, android app, mobile store

adec-app/adec.php 77% from 13 tests

"ADEC (Advance Dynamic E-Commerce)" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 257 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("adec-app.php" instead of "adec.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin75,135 lines of code in 474 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1733,4944,37632,835
PHP1555,2126,97523,944
Sass63650947,161
CSS523792175,223
LESS171161232,361
Markdown555301,673
SVG2001,619
JSON300107
XML21097
HTML17060
Bourne Shell124055

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity35.13
▷ Minimum class complexity1.00
▷ Maximum class complexity851.00
Average method complexity5.82
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes119
▷ Abstract classes00.00%
▷ Concrete classes119100.00%
▷ Final classes00.00%
Methods843
▷ Static methods11113.17%
▷ Public methods50960.38%
▷ Protected methods27532.62%
▷ Private methods597.00%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants58
▷ Global constants00.00%
▷ Class constants58100.00%
▷ Public constants58100.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
49 PNG files occupy 0.51MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
redux-framework/ReduxCore/assets/img/1col.png2.83KB0.14KB▼ 95.13%
redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vendor_support/vendor/select2/select2.png0.60KB0.99KB0.00%
redux-framework/ReduxCore/inc/fields/spinner/arrow_right.png0.15KB0.12KB▼ 18.18%