77% sstsubscribeform

Code Review | Mailchimp Subscribe Form by SoursopTree

WordPress plugin Mailchimp Subscribe Form by SoursopTree scored 77% from 54 tests.

About plugin

  • Plugin page: sstsubscribeform
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.3.1
  • WordPress version: 5.9.2
  • First release: Nov 19, 2015
  • Latest release: Dec 13, 2015
  • Number of updates: 35
  • Update frequency: every 0.7 days
  • Top authors: artheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,776 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.88MB] [CPU: ▼270.03ms] Passed 4 tests

Analyzing server-side resources used by Mailchimp Subscribe Form by SoursopTree
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.34 ▲2.2173.06 ▲42.78
Dashboard /wp-admin5.20 ▲1.8053.68 ▲17.43
Posts /wp-admin/edit.php5.41 ▲1.7797.60 ▲60.63
Add New Post /wp-admin/post-new.php9.06 ▲2.09102.32 ▼1,156.01
Media Library /wp-admin/upload.php5.17 ▲1.8840.86 ▲15.70
Theme /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-theme_uploader5.1237.35
New Form /wp-admin/post-new.php?post_type=sstssfb_builder6.2261.65
Add-on /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-addons_manager_page5.1236.12
Help /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-help_page5.1245.28
Subscribe Forms /wp-admin/edit.php?post_type=sstssfb_builder5.2140.29

Server storage [IO: ▲0.73MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • You have illegally modified 56 files (283.80KB) outside of "wp-content/plugins/sstsubscribeform/" and "wp-content/uploads/"
    • (new file) wp-content/sstssfb_assets/addons/$cplacer-main/js/position.js
    • (new file) wp-content/sstssfb_assets/addons/$bsettings-main/saverules.php
    • (new file) wp-content/sstssfb_assets/addons/$adesigner-main/designer.php
    • (new file) wp-content/sstssfb_assets/addons/$bsettings-main/scripts.php
    • (new file) wp-content/sstssfb_assets/addons/$cplacer-main/placement.php
    • (new file) wp-content/sstssfb_assets/addons/$bsettings-main/emailservice.php
    • (new file) wp-content/sstssfb_assets/addons/$bsettings-main/asset-ex/admin/mailadmin.css
    • (new file) wp-content/sstssfb_assets/addons/$bsettings-main/rules.php
    • (new file) wp-content/sstssfb_assets/addons/$bsettings-main/asset-ex/admin/mailadmin.js
    • (new file) wp-content/sstssfb_assets/addons/$bsettings-main/asset-ex/emailfrontend.js
    • ...
Filesystem: 85 new files
Database: no new tables, 1 new option
New WordPress options
widget_sstssfb_optinwidget

Browser metrics Passed 4 tests

A check of browser resources used by Mailchimp Subscribe Form by SoursopTree
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,864 ▲12015.98 ▲0.056.53 ▼0.462.45 ▲0.05
Dashboard /wp-admin2,995 ▲1336.16 ▲0.00129.89 ▼25.63207.79 ▲25.39
Posts /wp-admin/edit.php2,794 ▲1003.27 ▲0.0566.49 ▲0.75142.03 ▲0.90
Add New Post /wp-admin/post-new.php1,701 ▼1021.53 ▲0.88414.14 ▼60.09179.30 ▼46.25
Media Library /wp-admin/upload.php1,796 ▲985.60 ▲0.08167.18 ▲17.96274.13 ▲79.24
Theme /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-theme_uploader1,4505.33143.16106.69
New Form /wp-admin/post-new.php?post_type=sstssfb_builder5,1927.98182.37159.50
Add-on /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-addons_manager_page1,3795.35159.52149.57
Help /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-help_page1,5305.79143.21197.05
Subscribe Forms /wp-admin/edit.php?post_type=sstssfb_builder1,7625.83156.24143.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_sstssfb_optinwidget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require(): Failed opening required 'timezone.php' (include_path='.:/usr/share/php') in wp-content/plugins/sstsubscribeform/inc/geoip/timezone/test_timezone.php on line 3
    • > PHP Warning
      require_once(SSTSSFB_DIRclass-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/sstsubscribeform/inc/postlisttable/libs/class-wp-posts-list-table.php on line 3
    • > PHP Warning
      require(timezone.php): failed to open stream: No such file or directory in wp-content/plugins/sstsubscribeform/inc/geoip/timezone/test_timezone.php on line 3
    • > PHP Warning
      Use of undefined constant SSTSSFB_DIR - assumed 'SSTSSFB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sstsubscribeform/inc/postlisttable/libs/class-wp-posts-list-table.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'SSTSSFB_DIRclass-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/sstsubscribeform/inc/postlisttable/libs/class-wp-posts-list-table.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: this[binder] is not a function" "TypeError: this[binder] is not a function\n at s.fn.init.$.fn.tipsy (/wp-content/plugins/sstsubscribeform//js/jquery.tipsy.js?ver=1.0.0:180:25)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sstsubscribeform//js/admin/main.js?ver=1.0.0:4:21)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: this[binder] is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: this[binder] is not a function" "TypeError: this[binder] is not a function\n at s.fn.init.$.fn.tipsy (/wp-content/plugins/sstsubscribeform//js/jquery.tipsy.js?ver=1.0.0:180:25)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sstsubscribeform/inc//uptodate/js/main.js?ver=1.0.0:2:88)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: this[binder] is not a function" "TypeError: this[binder] is not a function\n at s.fn.init.$.fn.tipsy (/wp-content/plugins/sstsubscribeform//js/jquery.tipsy.js?ver=1.0.0:180:25)\n at HTMLDocument.\u003Canonymous> (/wp-content/sstssfb_assets/addons/mailchimp/asset-ex/mchimp.js?ver=0.1:3:16)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-help_page
    • > Network (severe)
    https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.id.W6EOS1c6tWs.O/m=auth/exm=ytsubscribe/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCPb3XmciTCqw92MwmGAXrcD8tRN1g/t=zcms/cb=gapi.loaded_1 - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-help_page
    • > Network (severe)
    https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.id.W6EOS1c6tWs.O/m=ytsubscribe/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCPb3XmciTCqw92MwmGAXrcD8tRN1g/t=zcms/cb=gapi.loaded_0 - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder&page=sstssfb-help_page
    • > Network (severe)
    https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.id.W6EOS1c6tWs.O/m=gapi_iframes,gapi_iframes_style_common/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCPb3XmciTCqw92MwmGAXrcD8tRN1g/t=zcms/cb=gapi.loaded_0 - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/edit.php?post_type=sstssfb_builder
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: this[binder] is not a function" "TypeError: this[binder] is not a function\n at s.fn.init.$.fn.tipsy (/wp-content/plugins/sstsubscribeform//js/jquery.tipsy.js?ver=1.0.0:180:25)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sstsubscribeform/inc/postlisttable/assets/js/listtable.js?ver=1.0.0:2:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined

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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 27 tag instead of maximum 10
You can look at the official readme.txt

sstsubscribeform/simpleform.php 85% from 13 tests

The main PHP script in "Mailchimp Subscribe Form by SoursopTree" version 0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sstsubscribeform.php" instead of "simpleform.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 370 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin15,435 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP367181,12110,205
CSS161621702,708
JavaScript123448042,150
Pascal2591,694317
Perl113055

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity25.00
▷ Minimum class complexity1.00
▷ Maximum class complexity203.00
Average method complexity5.03
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods155
▷ Static methods10.65%
▷ Public methods11775.48%
▷ Protected methods3220.65%
▷ Private methods63.87%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_100_f8f8f8_1x400.png0.10KB0.11KB0.00%
css/images/ui-icons_3383bb_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/images/ui-icons_70b2e1_256x240.png4.27KB4.11KB▼ 3.78%