79% swifterm

Code Review | SwiftERM

WordPress plugin SwiftERM scored79%from 54 tests.

About plugin

  • Plugin page: swifterm
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2016
  • Latest release: Jan 16, 2023
  • Number of updates: 39
  • Update frequency: every 62.7 days
  • Top authors: swifterm1 (71.79%)klm298 (30.77%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼5.32ms] Passed 4 tests

An overview of server-side resources used by SwiftERM
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2445.20 ▲4.52
Dashboard /wp-admin3.56 ▲0.2651.19 ▲0.05
Posts /wp-admin/edit.php3.61 ▲0.2652.90 ▼1.63
Add New Post /wp-admin/post-new.php6.08 ▲0.2088.94 ▼21.63
Media Library /wp-admin/upload.php3.42 ▲0.2038.29 ▲1.95
SwiftERM API Settings /wp-admin/options-general.php?page=swifterm3.3934.25

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 35 new files
Database: 1 new table, 6 new options
New tables
wp_swift_orders
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for SwiftERM
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.74 ▲0.182.00 ▲0.1844.65 ▼0.41
Dashboard /wp-admin2,209 ▲214.85 ▼1.05112.89 ▲4.9445.53 ▲0.35
Posts /wp-admin/edit.php2,095 ▲32.06 ▲0.0732.71 ▼12.6035.58 ▼0.68
Add New Post /wp-admin/post-new.php1,532 ▼1221.98 ▲3.38674.46 ▲15.4551.48 ▼4.33
Media Library /wp-admin/upload.php1,397 ▲94.32 ▼0.0598.87 ▼13.7145.77 ▼2.92
SwiftERM API Settings /wp-admin/options-general.php?page=swifterm7922.0226.0829.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • 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)
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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/swifterm/templates/version.php
    • > /wp-content/plugins/swifterm/includes/SwiftAPI/index.php
    • > /wp-content/plugins/swifterm/templates/product-feed.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_Product.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_Subscription.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_Ping.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_Version.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_ViewMail.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_Cart.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_OrderPackage.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_EmailPackage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/swifterm/includes/class-swifterm-order-feed.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'SwiftAPI_Request' not found in wp-content/plugins/swifterm/includes/SwiftAPI/SwiftAPI_Request_PastOrder.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: email marketing, swifterm, free trial

swifterm/swifterm.php Passed 13 tests

This is the main PHP file of "SwiftERM" version 1.2.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
53 characters long description:
SwiftERM intelligent eMail remarketing for wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected2,026 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP295173611,475
HTML2340542
CSS1006
INI1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes00.00%
Methods76
▷ Static methods3140.79%
▷ Public methods6990.79%
▷ Protected methods11.32%
▷ Private methods67.89%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants415.38%
▷ Class constants2284.62%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/swifterm_logo_152x66.png7.60KB3.97KB▼ 47.84%