77% chargely-free-subscriptions-for-woocommerce

Code Review | Chargely Free Subscriptions For Woocommernce

WordPress plugin Chargely Free Subscriptions For Woocommernce scored77%from 54 tests.

About plugin

  • Plugin page: chargely-free-sub...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2023
  • Latest release: May 20, 2023
  • Number of updates: 10
  • Update frequency: every 6.7 days
  • Top authors: chargely (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.28ms] Passed 4 tests

An overview of server-side resources used by Chargely Free Subscriptions For Woocommernce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.59 ▲2.98
Dashboard /wp-admin3.40 ▲0.0944.21 ▼1.82
Posts /wp-admin/edit.php3.51 ▲0.1548.39 ▲4.66
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.73 ▼17.77
Media Library /wp-admin/upload.php3.32 ▲0.0931.70 ▼0.49

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chargely Free Subscriptions For Woocommernce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.55 ▼0.682.06 ▲0.2944.02 ▲4.37
Dashboard /wp-admin2,206 ▲185.86 ▲0.97103.42 ▼3.4239.10 ▼0.97
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0139.08 ▲3.8833.62 ▼4.62
Add New Post /wp-admin/post-new.php1,514 ▼2217.62 ▼5.31678.01 ▲90.3956.86 ▲5.32
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0194.39 ▼2.7040.66 ▼2.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/frontend/add_to_cart.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/admin/refund.php:104
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/admin/subscriptions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/admin/setting.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/frontend/pay.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/frontend/checkout.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/admin/login.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_price() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/frontend/add_to_cart.php:193
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/frontend/subscription_menu.php:26
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/admin/edit_product.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/chargely-free-subscriptions-for-woocommerce/views/admin/transactions.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #3 (banner-772x250-rtl.jpg), #4 (banner-772x250.jpg), #5 (banner-1544X500-rtl.jpg), #6 (banner-1544X500.jpg), #7 (icon-128x128.jpg), #8 (icon-256X256.jpg)
You can look at the official readme.txt

chargely-free-subscriptions-for-woocommerce/chargely-woocommerce.php 85% from 13 tests

The principal PHP file in "Chargely Free Subscriptions For Woocommernce" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 173 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("chargely-free-subscriptions-for-woocommerce.php" instead of "chargely-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin8,821 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP13943776,177
JavaScript4129361,949
CSS312924688
SVG1007

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.62MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/admin/images/pci_compliance_logo.png2.90KB2.73KB▼ 5.85%
views/admin/images/login_account.png0.50KB0.37KB▼ 26.81%
views/admin/images/secure.png4.00KB3.50KB▼ 12.60%
views/admin/images/dashboard_connect_left.png129.28KB32.33KB▼ 74.99%
views/admin/images/phone.png42.68KB13.11KB▼ 69.28%