10% dragon-ecommerce-reserve-without-online-payment

Code Review | Dragon Ecommerce Reserve Plugin Without Online Payment for WordPress

WordPress plugin Dragon Ecommerce Reserve Plugin Without Online Payment for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: dragon-ecommerce-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2021
  • Latest release: Aug 2, 2023
  • Number of updates: 53
  • Update frequency: every 12.1 days
  • Top authors: v20202020 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,046 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_importer.php+535
    Undefined variable: U

Server metrics [RAM: ▲7.56MB] [CPU: ▼7.89ms] 75% from 4 tests

Analyzing server-side resources used by Dragon Ecommerce Reserve Plugin Without Online Payment for WordPress
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 7.56MB on /wp-admin/options-general.php?page=Dragon Ecommerce Reserve)
PageMemory (MB)CPU Time (ms)
Home /11.55 ▲8.0959.68 ▲19.72
Dashboard /wp-admin11.57 ▲8.2351.35 ▼8.20
Posts /wp-admin/edit.php11.57 ▲8.2249.55 ▲5.56
Add New Post /wp-admin/post-new.php11.57 ▲5.6950.09 ▼41.64
Media Library /wp-admin/upload.php11.57 ▲8.3548.98 ▲12.72

Server storage [IO: ▲22.59MB] [DB: ▲0.20MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 81 new files
Database: 35 new tables, 6 new options
New tables
wp_dragonecommercereservezyx987_distance
wp_dragonecommercereservezyx987_order_propertyvalue
wp_dragonecommercereservezyx987_user_status
wp_dragonecommercereservezyx987_product_propertyvalue_store
wp_dragonecommercereservezyx987_setting
wp_dragonecommercereservezyx987_product
wp_dragonecommercereservezyx987_order_group
wp_dragonecommercereservezyx987_product_store
wp_dragonecommercereservezyx987_product_quantity_alert
wp_dragonecommercereservezyx987_log
...
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics 75% from 4 tests

Dragon Ecommerce Reserve Plugin Without Online Payment for WordPress: an overview of browser usage
It is time to focus on the following
  • Nodes: It is recommended to reduce the number of DOM nodes under 25,000 (currently 34,340 on /wp-admin/options-general.php?page=Dragon Ecommerce Reserve)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.20 ▼1.381.94 ▲0.4136.65 ▼1.22
Dashboard /wp-admin2,210 ▲214.87 ▼0.08114.72 ▲8.2240.94 ▼1.02
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0138.24 ▲4.7835.01 ▼0.32
Add New Post /wp-admin/post-new.php1,536 ▲2223.45 ▲5.96696.77 ▼9.0363.78 ▲10.32
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0494.67 ▼16.1340.30 ▼7.17
Dragon Ecommerce Reserve /wp-admin/options-general.php?page=Dragon Ecommerce Reserve34,3405.37450.36160.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The plugin did not uninstall successfully, leaving 35 tables in the database
    • wp_dragonecommercereservezyx987_product_group
    • wp_dragonecommercereservezyx987_processstatus
    • wp_dragonecommercereservezyx987_setting
    • wp_dragonecommercereservezyx987_product_propertyvalue_store
    • wp_dragonecommercereservezyx987_order_group
    • wp_dragonecommercereservezyx987_product_store
    • wp_dragonecommercereservezyx987_department
    • wp_dragonecommercereservezyx987_product_quantity_alert
    • wp_dragonecommercereservezyx987_group_property
    • wp_dragonecommercereservezyx987_chargetype
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dragonecommercereservezyx987_showEcommerceLandingPage() in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/template-dragonecommercereserve.php:12
    • > PHP Notice
      Trying to get property 'use_mysqli' of non-object in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_landingpage.php on line 23
    • > PHP Notice
      Trying to get property 'use_mysqli' of non-object in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_admin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_importer.php:24
    • > PHP Notice
      Trying to get property 'use_mysqli' of non-object in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_admin.php on line 5
    • > PHP Notice
      Trying to get property 'use_mysqli' of non-object in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_landingpage.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_landingpage.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
  • 31 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Dragon Ecommerce Reserve
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that require attention: You can look at the official readme.txt

dragon-ecommerce-reserve-without-online-payment/dragonecommercereservezyx987_importer.php 85% from 13 tests

The principal PHP file in "Dragon Ecommerce Reserve Plugin Without Online Payment for WordPress" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 256 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("dragon-ecommerce-reserve-without-online-payment.php" instead of "dragonecommercereservezyx987_importer.php")

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected90,099 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
CSS208,43142138,891
PHP42,71182429,954
JavaScript113,5141,63911,892
SQL11,4997349,362

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions208
▷ Named functions20297.12%
▷ Anonymous functions62.88%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) css/scroll_back.png0.10KB0.00KB▼ 100.00%
(invalid) css/scroll_forward.png0.10KB0.00KB▼ 100.00%
css/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
images/no_img.png2.45KB1.17KB▼ 52.05%
images/no_img2.png7.66KB3.09KB▼ 59.67%