72% storefront-jetpack

Code Review | Storefront Jetpack

WordPress plugin Storefront Jetpack scored 72% from 54 tests.

About plugin

  • Plugin page: storefront-jetpack
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2015
  • Latest release: Jun 5, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: nickburne (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 13,099 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.69ms] Passed 4 tests

This is a short check of server-side resources used by Storefront Jetpack
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.20 ▲2.55
Dashboard /wp-admin3.37 ▲0.0745.45 ▼3.17
Posts /wp-admin/edit.php3.49 ▲0.1347.91 ▲0.62
Add New Post /wp-admin/post-new.php5.97 ▲0.0991.92 ▼6.77
Media Library /wp-admin/upload.php3.30 ▲0.0739.45 ▲3.51
Storefront Jetpack /wp-admin/themes.php?page=storefront_jetpack3.4131.46

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Storefront Jetpack
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲15613.66 ▼0.745.13 ▲3.1743.80 ▲0.58
Dashboard /wp-admin2,217 ▲324.87 ▼1.0395.95 ▼8.2338.55 ▼8.00
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0640.16 ▲6.4637.21 ▲5.32
Add New Post /wp-admin/post-new.php1,521 ▼1517.83 ▼5.42682.27 ▲11.8559.80 ▲7.97
Media Library /wp-admin/upload.php1,396 ▲114.16 ▼0.05100.84 ▼4.9145.57 ▼0.97
Storefront Jetpack /wp-admin/themes.php?page=storefront_jetpack9882.2224.6634.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/themes.php?page=storefront_jetpack
    • > Warning in wp-content/plugins/storefront-jetpack/admin/partials/sfjp-admin-display.php+46
    Illegal string offset 'align_menu_right'
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=storefront_jetpack
    • > Notice in wp-content/plugins/storefront-jetpack/admin/partials/sfjp-admin-display.php+46
    Uninitialized string offset: 0
    • > GET request to /wp-admin/themes.php?page=storefront_jetpack
    • > Warning in wp-content/plugins/storefront-jetpack/admin/partials/sfjp-admin-display.php+46
    Illegal string offset 'add_top_bar'
    • > GET request to /wp-admin/themes.php?page=storefront_jetpack
    • > Warning in wp-content/plugins/storefront-jetpack/admin/partials/sfjp-admin-display.php+46
    Illegal string offset 'remove_header_search'
    • > GET request to /wp-admin/themes.php?page=storefront_jetpack
    • > Warning in wp-content/plugins/storefront-jetpack/admin/partials/sfjp-admin-display.php+46
    Illegal string offset 'custom_logo'

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/storefront-jetpack/public/partials/sfjp-public-display.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/storefront-jetpack/admin/partials/sfjp-admin-display.php:15
    • > PHP Warning
      Use of undefined constant StorefrontJetpackUrl - assumed 'StorefrontJetpackUrl' (this will throw an Error in a future version of PHP) in wp-content/plugins/storefront-jetpack/includes/sfjp-vars.php on line 46
    • > PHP Warning
      Use of undefined constant StorefrontJetpackUrl - assumed 'StorefrontJetpackUrl' (this will throw an Error in a future version of PHP) in wp-content/plugins/storefront-jetpack/includes/sfjp-vars.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/storefront-jetpack/public/mods/top-bar.php:23
    • > PHP Warning
      Use of undefined constant StorefrontJetpackUrl - assumed 'StorefrontJetpackUrl' (this will throw an Error in a future version of PHP) in wp-content/plugins/storefront-jetpack/includes/sfjp-vars.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/storefront-jetpack/public/mods/custom-logo.php:21
    • > PHP Warning
      Use of undefined constant StorefrontJetpackUrl - assumed 'StorefrontJetpackUrl' (this will throw an Error in a future version of PHP) in wp-content/plugins/storefront-jetpack/includes/sfjp-vars.php on line 40

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

storefront-jetpack/storefront-jetpack.php Passed 13 tests

The entry point to "Storefront Jetpack" version 1.0.0 is a PHP file that has certain tags in its header comment area
122 characters long description:
A powerful plugin with lots of features for WooThemes Storefront. Go to Appearance > Storefront Jetpack for settings page.

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
Good job! No executable or dangerous file extensions detected1,105 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP213221,157979
CSS2208107
JavaScript232719

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.91
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes327.27%
Methods83
▷ Static methods56.02%
▷ Public methods6375.90%
▷ Protected methods78.43%
▷ Private methods1315.66%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.84MB with 0.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/hide-header-search.png4.33KB1.94KB▼ 55.21%
assets/custom-logo.png3.80KB1.65KB▼ 56.69%
assets/top-bar.png2.39KB0.89KB▼ 62.88%
assets/banner-772x250.png169.68KB49.08KB▼ 71.08%
assets/pootle-logo.png89.81KB8.23KB▼ 90.84%