10% fastspring

Code Review | FastSpring

WordPress plugin FastSpring scored10%from 54 tests.

About plugin

  • Plugin page: fastspring
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 18, 2018
  • Latest release: Mar 23, 2022
  • Number of updates: 104
  • Update frequency: every 12.9 days
  • Top authors: jtewes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /8,834 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/fastspring/fastspring.php+4337
    Undefined variable: fastspring_settings_translations

Server metrics [RAM: ▲0.96MB] [CPU: ▼13.21ms] Passed 4 tests

Analyzing server-side resources used by FastSpring
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.10 ▲2.6451.94 ▲11.91
Dashboard /wp-admin4.55 ▲1.2557.24 ▲4.13
Posts /wp-admin/edit.php4.60 ▲1.2557.19 ▲2.56
Add New Post /wp-admin/post-new.php6.06 ▲0.1858.47 ▼64.39
Media Library /wp-admin/upload.php4.41 ▲1.1851.93 ▲4.87
EDS Buy Button /wp-admin/admin.php?page=fastspring_settings_eds_button_settings4.3838.46
Custom CSS /wp-admin/admin.php?page=fastspring_settings_custom_css4.3839.27
About /wp-admin/admin.php?page=fastspring_settings_about4.3841.11
FastSpring Settings /wp-admin/admin.php?page=fastspring_settings_menu4.3942.22
Cross-Sell Button /wp-admin/admin.php?page=fastspring_settings_cross_sell_button_settings4.3835.98
Checkout Button /wp-admin/admin.php?page=fastspring_settings_checkout_button_settings4.3839.43
Up-Sell Button /wp-admin/admin.php?page=fastspring_settings_up_sell_button_settings4.3837.67
Nav Menu /wp-admin/admin.php?page=fastspring_settings_nav_menu4.3838.50
View Cart Button /wp-admin/admin.php?page=fastspring_settings_view_cart_button_settings4.3838.65
Translations /wp-admin/admin.php?page=fastspring_settings_translations4.4244.89

Server storage [IO: ▲4.12MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 48 new files
Database: no new tables, 20 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
fastspring_settings_general_settings
db_upgraded
fastspring_settings_checkout_button_settings
fastspring_settings_about
fastspring_settings_buy_button_settings
wisdom_notification_times
widget_theysaidso_widget
fastspring_settings_shopping_cart_settings
...

Browser metrics Passed 4 tests

FastSpring: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,295 ▲53415.20 ▲0.9240.53 ▲38.6046.56 ▼0.11
Dashboard /wp-admin2,338 ▲1615.80 ▲0.1790.23 ▼10.9742.07 ▼0.96
Posts /wp-admin/edit.php2,250 ▲1532.42 ▲0.4538.52 ▲2.3235.16 ▲0.98
Add New Post /wp-admin/post-new.php6,531 ▲5,00530.09 ▲6.83987.95 ▲369.8938.65 ▼24.73
Media Library /wp-admin/upload.php1,621 ▲2214.42 ▲0.23106.48 ▲0.3945.09 ▼1.10
EDS Buy Button /wp-admin/admin.php?page=fastspring_settings_eds_button_settings1,0942.2230.5138.96
Custom CSS /wp-admin/admin.php?page=fastspring_settings_custom_css1,0152.0829.1434.41
About /wp-admin/admin.php?page=fastspring_settings_about1,0172.0628.3028.55
FastSpring Settings /wp-admin/admin.php?page=fastspring_settings_menu1,1292.2229.7547.62
Cross-Sell Button /wp-admin/admin.php?page=fastspring_settings_cross_sell_button_settings1,0972.2130.8631.33
Checkout Button /wp-admin/admin.php?page=fastspring_settings_checkout_button_settings1,1092.2229.0534.19
Up-Sell Button /wp-admin/admin.php?page=fastspring_settings_up_sell_button_settings1,0942.2030.2636.12
Nav Menu /wp-admin/admin.php?page=fastspring_settings_nav_menu1,0222.0030.3927.91
View Cart Button /wp-admin/admin.php?page=fastspring_settings_view_cart_button_settings1,1292.2128.1633.58
Translations /wp-admin/admin.php?page=fastspring_settings_translations5,5772.1841.16203.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 20 options in the database
    • fastspring_settings_view_cart_button_settings
    • fastspring_settings_remove_from_cart_button_settings
    • fastspring_settings_custom_css
    • fastspring_settings_about
    • fastspring_settings_up_sell_button_settings
    • fastspring_settings_checkout_button_settings
    • fastspring_settings_eds_button_settings
    • wisdom_notification_times
    • can_compress_scripts
    • fastspring_settings_shopping_cart_settings
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fastspring/includes/fastspringmodal.php
  • 2044× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 158
    • > PHP Notice
      Undefined index: translationDefaults in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 500
    • > PHP Notice
      Undefined index: translationDefaults in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 538
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 302
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 396
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 417
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 501
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 130
    • > PHP Notice
      Undefined variable: fastspring_options in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 170
    • > PHP Notice
      Undefined variable: fastspring_options in wp-content/plugins/fastspring/includes/fastspringmodal.php on line 287

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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:
  • Contributors: Plugin contributors field is missing
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

fastspring/fastspring.php Passed 13 tests

The main file in "FastSpring" v. 3.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
116 characters long description:
The FastSpring WordPress Plugin is a tool that lets you integrate your FastSpring Store with your WordPress website.

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
No dangerous file extensions were detected18,646 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,299
PHP9174316,430
JavaScript412342,915
CSS2042

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.40
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods4590.00%
▷ Protected methods00.00%
▷ Private methods510.00%
Functions84
▷ Named functions7285.71%
▷ Anonymous functions1214.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.36MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png254.54KB149.08KB▼ 41.43%
assets/icon-128x128.png7.09KB3.34KB▼ 52.95%
assets/icon-256x256.png13.99KB6.46KB▼ 53.79%
assets/banner-772x250.png96.81KB55.14KB▼ 43.04%