10% adec-app

Code Review | ADEC (Advance Dynamic E-Commerce)

WordPress plugin ADEC (Advance Dynamic E-Commerce) scored10%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: 6.3.1
  • 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 /960 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > 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: ▼0.61MB] [CPU: ▼47.46ms] Passed 4 tests

Server-side resources used by ADEC (Advance Dynamic E-Commerce)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0814.20 ▼24.55
Dashboard /wp-admin3.41 ▲0.0618.10 ▼50.49
Posts /wp-admin/edit.php3.41 ▲0.0517.34 ▼30.47
Add New Post /wp-admin/post-new.php3.41 ▼2.4815.45 ▼84.32
Media Library /wp-admin/upload.php3.41 ▲0.1814.85 ▼20.77
Store Configuration /wp-admin/admin.php?page=ADECPlugin&tab=13.4116.08
Options Object /wp-admin/admin.php?page=ADECPlugin&tab=33.4117.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 725 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
redux_version_upgraded_from
can_compress_scripts
obs_mobile_store-transients

Browser metrics Passed 4 tests

Checking browser requirements for ADEC (Advance Dynamic E-Commerce)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,037 ▲26615.27 ▲0.525.43 ▲3.4645.14 ▲2.37
Dashboard /wp-admin2,355 ▲1646.24 ▲0.36118.70 ▲19.5886.10 ▲46.94
Posts /wp-admin/edit.php2,193 ▲1042.96 ▲0.9346.18 ▲9.3865.85 ▲27.08
Add New Post /wp-admin/post-new.php1,764 ▲25024.26 ▲6.62735.12 ▲41.5332.99 ▼16.19
Media Library /wp-admin/upload.php1,490 ▲995.40 ▲1.21110.20 ▲8.1091.66 ▲45.40
Store Configuration /wp-admin/admin.php?page=ADECPlugin&tab=11,2433.5668.8588.12
Options Object /wp-admin/admin.php?page=ADECPlugin&tab=31,2303.7665.5843.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall 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
  • The uninstall procedure has failed, leaving 8 options in the database
    • obs_mobile_store-transients
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • redux_version_upgraded_from

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 30× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_store_settings.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_section_two.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_google_adsense.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_notice.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_contact_us.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_video_tutorial.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_google_analytics.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_welcome_permission.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_check_permission.php
    • > /wp-content/plugins/adec-app/redux-framework/sample/adec_slider_custom_image.php
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/class.p.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/welcome/views/about.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/themecheck/checks/embedded.php:3
    • > 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 add_filter() in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/fields/select/elusive-icons.php:312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/welcome/views/changelog.php:2
    • > 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: Class 'WP_Customize_Section' not found in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/extensions/customizer/inc/customizer_devs.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/adec-app/redux-framework/ReduxCore/inc/welcome/views/credits.php:2
    • > 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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ADECPlugin&tab=3
    • > Javascript (severe) in unknown
    https://maps.google.com/maps/api/js?key=AIzaSyBcVcz5OZ6eNBi5d7CFYHIdtsEI5BQlm68&callback=initMap&ver=20161019 128:473 Uncaught fca: initMap is not a function

Optimizations

Plugin configuration 90% 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
4 plugin tags: android app, mobile store, wordpress mobile app, mobile app

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

The primary PHP file in "ADEC (Advance Dynamic E-Commerce)" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("adec-app.php" instead of "adec.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 257 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected75,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

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Method cyclomatic complexity has to 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 Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
49 compressed PNG files occupy 0.51MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_ffffff_1x400.png0.10KB0.10KB▼ 4.67%
redux-framework/ReduxCore/assets/js/vendor/select2/select2x2.png0.83KB0.77KB▼ 6.15%
redux-framework/ReduxCore/assets/js/vendor/select2/select2.png0.60KB0.99KB0.00%
redux-framework/ReduxCore/assets/img/adec-logo-for-android-app_white.png9.83KB8.04KB▼ 18.27%
redux-framework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%