79% freshjet

Code Review | Freshjet

WordPress plugin Freshjet scored 79% from 54 tests.

About plugin

  • Plugin page: freshjet
  • Plugin version: 0.6.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 5.8.1
  • First release: Jul 29, 2019
  • Latest release: Aug 24, 2021
  • Number of updates: 13
  • Update frequency: every 58.5 days
  • Top authors: contactjavas (84.62%)freshforcesbd (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,571 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼143.05ms] Passed 4 tests

Analyzing server-side resources used by Freshjet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.15 ▲0.4236.90 ▲14.14
Dashboard /wp-admin3.44 ▲0.3853.81 ▲0.87
Posts /wp-admin/edit.php3.49 ▲0.3849.40 ▼2.62
Add New Post /wp-admin/post-new.php5.74 ▲0.3091.25 ▼576.05
Media Library /wp-admin/upload.php3.32 ▲0.3239.29 ▲5.59

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 145 new files
Database: no new tables, 1 new option
New WordPress options
freshjet_options

Browser metrics Passed 4 tests

Checking browser requirements for Freshjet
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,753 ▲14716.24 ▲0.569.19 ▼0.0247.96 ▼5.20
Dashboard /wp-admin3,013 ▲825.86 ▼0.08138.82 ▼13.98142.27 ▲11.74
Posts /wp-admin/edit.php2,790 ▲542.58 ▼0.1265.94 ▼4.1692.02 ▼11.45
Add New Post /wp-admin/post-new.php1,922 ▲34123.66 ▲5.62397.54 ▲0.58113.64 ▼14.79
Media Library /wp-admin/upload.php1,801 ▼64.99 ▼0.07138.59 ▼20.49135.01 ▼4.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • freshjet_options

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
Good news, no errors were detected

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 take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/freshjet/functions.php
    • > /wp-content/plugins/freshjet/autoload.php
    • > /wp-content/plugins/freshjet/freshjet.php
  • 45× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/promises/src/AggregateException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/promises/src/FulfilledPromise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/promises/src/RejectedPromise.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/psr7/src/Request.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/promises/src/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/freshjet/vendor/guzzlehttp/psr7/src/AppendStream.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: mailjet, freshjet, smtp email, transactional email, wp_mail smtp

freshjet/freshjet.php Passed 13 tests

The main PHP file in "Freshjet" ver. 0.6.6 adds more information about the plugin and also serves as the entry point for this plugin
38 characters long description:
Mailjet wp_mail() drop-in replacement.

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
There were no executable files found in this plugin13,570 lines of code in 130 files:
LanguageFilesBlank linesComment linesLines of code
PHP1051,9775,3019,446
Markdown111,08603,399
JSON800552
CSS1293128
XML11315
YAML10015
make1409
SVG2006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.18
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces10
Interfaces14
Traits2
Classes73
▷ Abstract classes00.00%
▷ Concrete classes73100.00%
▷ Final classes810.96%
Methods736
▷ Static methods679.10%
▷ Public methods58980.03%
▷ Protected methods50.68%
▷ Private methods14219.29%
Functions144
▷ Named functions5840.28%
▷ Anonymous functions8659.72%
Constants70
▷ Global constants710.00%
▷ Class constants6390.00%
▷ Public constants63100.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
5 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mailjet-logo-small.png1.10KB0.95KB▼ 13.93%
assets/images/icon-256x256.png9.84KB4.67KB▼ 52.47%
assets/images/banner-772x250.png40.81KB16.59KB▼ 59.35%
assets/images/screenshot-1.png73.30KB33.31KB▼ 54.56%
assets/images/mailjet-logo.png18.21KB4.73KB▼ 74.04%