62% icdsoft-reseller-store

Code Review | ICDSoft Reseller Store

WordPress plugin ICDSoft Reseller Store scored62%from 54 tests.

About plugin

  • Plugin page: icdsoft-reseller-...
  • Plugin version: 2.3.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2019
  • Latest release: Oct 30, 2023
  • Number of updates: 93
  • Update frequency: every 17.1 days
  • Top authors: madjarov (58.06%)icdsoft (43.01%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,882 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.67MB] [CPU: ▲8.61ms] 75% from 4 tests

A check of server-side resources used by ICDSoft Reseller Store
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 710.17ms on /wp-admin/admin.php?page=icd-hosting-settings)
PageMemory (MB)CPU Time (ms)
Home /5.00 ▲1.5453.48 ▲15.22
Dashboard /wp-admin5.00 ▲1.7061.65 ▲13.63
Posts /wp-admin/edit.php5.08 ▲1.7365.97 ▲16.96
Add New Post /wp-admin/post-new.php7.69 ▲1.8086.10 ▼10.18
Media Library /wp-admin/upload.php4.94 ▲1.7151.10 ▲15.75
ICDSoft Hosting /wp-admin/admin.php?page=icd_hosting4.6843.75
Settings /wp-admin/admin.php?page=icd-hosting-welcome4.8646.21
Settings /wp-admin/admin.php?page=icd-hosting-settings4.86710.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 609 new files
Database: no new tables, 17 new options
New WordPress options
icd_hosting_version
widget_recent-comments
icd_hosting_request_page_id
icd_hosting
icd_hosting_terms_page_id
icd_hosting_excluded_pages_ids
icd_hosting_payment_page_id
icd_hosting_hostingorder_page_id
icd_hosting_domaincheck_page_id
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for ICDSoft Reseller Store
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.93 ▼0.4210.55 ▲9.0543.57 ▲3.42
Dashboard /wp-admin2,201 ▲235.56 ▼0.1582.24 ▼35.9374.45 ▲32.58
Posts /wp-admin/edit.php2,124 ▲272.00 ▼0.0234.87 ▼2.8432.13 ▼6.30
Add New Post /wp-admin/post-new.php1,434 ▼10317.39 ▼0.90674.07 ▲32.5162.52 ▼9.88
Media Library /wp-admin/upload.php1,418 ▲214.19 ▲0.0196.26 ▼6.8566.22 ▲21.97
ICDSoft Hosting /wp-admin/admin.php?page=icd_hosting280.420.063.72
Settings /wp-admin/admin.php?page=icd-hosting-welcome8322.2925.7625.31
Settings /wp-admin/admin.php?page=icd-hosting-settings9532.1626.3635.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/tests/bootstrap.php
    • > /wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/build.php
    • > /wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/examples/oauth.php
    • > /wp-content/plugins/icdsoft-reseller-store/templates/payment-details-braintree.php
    • > /wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/icdsoft-reseller-store/templates/extra-attributes.php
    • > /wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/tests/bootstrap.no_autoload.php
    • > /wp-content/plugins/icdsoft-reseller-store/templates/compare_plans.php
  • 434× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/tests/Stripe/AccountTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/lib/Error/Authentication.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/tests/Stripe/DisputeTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/tests/Stripe/ApplePayDomainTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/lib/File.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/lib/PaymentIntent.php:58
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\BaseStripeClient' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/lib/StripeClient.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'Braintree\\Base' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/lib/Braintree/PartnerMerchant.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/lib/ApplicationFee.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=icd_hosting
    • > Network (severe)
    wp-admin/admin.php?page=icd_hosting - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

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
7 plugin tags: web hosting, store, shortcode, products, ecommerce...

icdsoft-reseller-store/icd-hosting.php 77% from 13 tests

"ICDSoft Reseller Store" version 2.3.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 195 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("icdsoft-reseller-store.php" instead of "icd-hosting.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/icdsoft-reseller-store/includes/libraries/lib/ssl/api_braintreegateway_com.ca.crt
      • wp-content/plugins/icdsoft-reseller-store/includes/libraries/stripe/stripe-php/data/ca-certificates.crt
45,629 lines of code in 584 files:
LanguageFilesBlank linesComment linesLines of code
PHP5626,13117,90133,858
CSS41,851218,368
JavaScript2253531,857
Markdown667101,033
SVG200338
XML30061
JSON10048
YAML37139
make19027

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.72
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces38
Interfaces6
Traits7
Classes513
▷ Abstract classes132.53%
▷ Concrete classes50097.47%
▷ Final classes10.20%
Methods2,496
▷ Static methods68927.60%
▷ Public methods2,14786.02%
▷ Protected methods1746.97%
▷ Private methods1757.01%
Functions57
▷ Named functions4070.18%
▷ Anonymous functions1729.82%
Constants1,588
▷ Global constants110.69%
▷ Class constants1,57799.31%
▷ Public constants1,577100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/geotrust.png1.88KB2.37KB0.00%
includes/libraries/stripe/stripe-php/tests/data/test.png0.09KB0.09KB0.00%
assets/img/iadvantage.png0.46KB0.46KB0.00%
assets/img/favicon.png0.16KB0.16KB0.00%
assets/img/centurylink.png0.48KB0.40KB▼ 16.39%