78% jpssp

Code Review | Jetpack Sharing Source Pack

WordPress plugin Jetpack Sharing Source Pack scored78%from 54 tests.

About plugin

  • Plugin page: jpssp
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Aug 26, 2014
  • Latest release: Dec 6, 2015
  • Number of updates: 11
  • Update frequency: every 42.6 days
  • Top authors: extendwings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,629 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.01MB] [CPU: ▼5.19ms] Passed 4 tests

Server-side resources used by Jetpack Sharing Source Pack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0626.43 ▼8.71
Dashboard /wp-admin3.32 ▲0.0251.09 ▲4.03
Posts /wp-admin/edit.php3.37 ▲0.0160.22 ▲15.27
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.35 ▼14.84
Media Library /wp-admin/upload.php3.24 ▲0.0143.21 ▼1.24

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
jpssp-api_activated
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Jetpack Sharing Source Pack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼28113.38 ▼1.210.53 ▼1.2620.98 ▼18.21
Dashboard /wp-admin2,203 ▲155.86 ▼0.08114.70 ▼2.3148.49 ▲2.82
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0339.81 ▼0.1636.60 ▲1.33
Add New Post /wp-admin/post-new.php1,537 ▲1823.31 ▲0.17740.01 ▲19.3378.29 ▲11.37
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.01136.69 ▲6.3165.15 ▲12.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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 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
Almost there! Just fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jpssp/class.sharing-services.php
    • > /wp-content/plugins/jpssp/class.sharing-sources.php
    • > /wp-content/plugins/jpssp/jetpack-sharing-source-pack.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jpssp/class.jpssp-api.php:19

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: share, jetpack, sns, sharing, social

jpssp/jetpack-sharing-source-pack.php 92% from 13 tests

The entry point to "Jetpack Sharing Source Pack" version 0.1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("jpssp.php" instead of "jetpack-sharing-source-pack.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected834 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP412119496
CSS14042285
JavaScript110253

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.62
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods56
▷ Static methods610.71%
▷ Public methods5394.64%
▷ Protected methods00.00%
▷ Private methods35.36%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
34 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/LINE/rectangle-zh-hant@2x.png3.11KB1.86KB▼ 40.13%
images/LINE/shape-white@2x.png1.15KB1.40KB0.00%
images/feedly/rectangle-sample.png2.79KB1.80KB▼ 35.46%
images/Hatena/rectangle-sample.png2.75KB1.77KB▼ 35.54%
images/LINE/rectangle-en@2x.png2.40KB1.69KB▼ 29.58%