84% jetstash-connect

Code Review | Jetstash Connect

WordPress plugin Jetstash Connect scored84%from 54 tests.

About plugin

  • Plugin page: jetstash-connect
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jul 20, 2015
  • Latest release: Dec 16, 2015
  • Number of updates: 9
  • Update frequency: every 20.1 days
  • Top authors: jetstash (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /761 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Jetstash Connect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.47 ▲2.31
Dashboard /wp-admin3.40 ▲0.0657.63 ▼7.25
Posts /wp-admin/edit.php3.52 ▲0.1652.18 ▲0.55
Add New Post /wp-admin/post-new.php6.00 ▲0.1288.18 ▼21.86
Media Library /wp-admin/upload.php3.33 ▲0.1038.52 ▼1.08

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
jetstash_connect_version
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jetstash Connect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12513.44 ▼0.718.53 ▲6.5142.00 ▼0.49
Dashboard /wp-admin2,214 ▲375.69 ▲0.0385.17 ▼6.7738.12 ▼7.16
Posts /wp-admin/edit.php2,116 ▲162.01 ▲0.0235.23 ▼9.9535.69 ▼2.47
Add New Post /wp-admin/post-new.php1,540 ▲1423.30 ▲0.26683.61 ▲36.3457.80 ▲6.21
Media Library /wp-admin/upload.php1,419 ▲194.17 ▼0.06100.59 ▼14.9245.39 ▼0.61

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • jetstash_connect_version
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jetstash-connect/jetstash-connect.php:11
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/jetstash-connect/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/jetstash-connect/admin/options.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/jetstash-connect/tests/testJetstashConnect.php:3
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/jetstash-connect/tests/bootstrap.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === jetstash-connect === )
You can take inspiration from this readme.txt

jetstash-connect/jetstash-connect.php Passed 13 tests

This is the main PHP file of "Jetstash Connect" version 1.3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
89 characters long description:
Dynamically pulls forms from Jetstash and integrates them via a shortcode into the theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin998 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP5121334621
JavaScript53742139
Bourne Shell222689
CSS213252
Markdown130049
JSON20031
XML10014
SVG1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity34.67
▷ Minimum class complexity22.00
▷ Maximum class complexity54.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods48.89%
▷ Public methods2146.67%
▷ Protected methods48.89%
▷ Private methods2044.44%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.31MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png94.33KB50.16KB▼ 46.83%
assets/icon-256x256.png3.89KB1.20KB▼ 69.25%
assets/icon-128x128.png2.74KB1.24KB▼ 54.59%
img/jetstash-logo.png4.97KB4.05KB▼ 18.61%
assets/banner-1544x500.png210.07KB121.93KB▼ 41.96%