10% slimjetpack

Code Review | Slim Jetpack

WordPress plugin Slim Jetpack scored10%from 54 tests.

About plugin

  • Plugin page: slimjetpack
  • Plugin version: 2.7.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8
  • WordPress version: 6.3.1
  • First release: Jan 9, 2013
  • Latest release: Jan 10, 2014
  • Number of updates: 45
  • Update frequency: every 8.1 days
  • Top authors: WingerSpeed (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

3,000+ active /119,371 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/slimjetpack/class.jetpack.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; Jetpack has a deprecated constructor

Server metrics [RAM: ▼0.77MB] [CPU: ▼46.68ms] Passed 4 tests

Analyzing server-side resources used by Slim Jetpack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.21 ▼0.258.95 ▼28.95
Dashboard /wp-admin3.23 ▼0.0711.10 ▼37.94
Posts /wp-admin/edit.php3.23 ▼0.128.07 ▼39.25
Add New Post /wp-admin/post-new.php3.23 ▼2.658.91 ▼80.59
Media Library /wp-admin/upload.php3.23 ▲0.0113.78 ▼20.45
Slim Jetpack /wp-admin/options-general.php?page=jetpack3.238.66
/wp-admin/admin.php?page=jetpack-debugger3.2310.21

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 583 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
jetpack_activated
jetpack_options
widget_theysaidso_widget
recovery_mode_email_last_sent
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Slim Jetpack
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.26 ▼1.494.75 ▲2.8345.47 ▲3.57
Dashboard /wp-admin2,212 ▲214.88 ▼0.02114.61 ▲4.5146.44 ▲1.47
Posts /wp-admin/edit.php2,101 ▲152.05 ▲0.0434.85 ▼2.4733.02 ▼3.88
Add New Post /wp-admin/post-new.php1,536 ▲1623.13 ▼0.31701.16 ▼3.0158.02 ▼7.76
Media Library /wp-admin/upload.php1,397 ▲64.14 ▼0.01110.26 ▲5.8150.05 ▲1.70
Slim Jetpack /wp-admin/options-general.php?page=jetpack1,1801.5422.5545.77
/wp-admin/admin.php?page=jetpack-debugger7801.557.9938.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/slimjetpack/class.jetpack.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; Jetpack has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jetpack-debugger
    • > Deprecated in wp-content/plugins/slimjetpack/class.jetpack.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; Jetpack has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jetpack-debugger
    • > Deprecated in wp-content/plugins/slimjetpack/class.jetpack-user-agent.php+61
    Methods with the same name as their class will not be constructors in a future version of PHP; Jetpack_User_Agent_Info has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jetpack-debugger
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=jetpack
    • > Error in wp-content/plugins/slimjetpack/modules/module-info.php+128
    Uncaught Error: [] operator not supported for strings in wp-content/plugins/slimjetpack/modules/module-info.php:128
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): jetpack_shortcodes_more_info_connected()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-content/plugins/slimjetpack/class.jetpack.php(3089): do_action()
    #4 wp-content/plugins/slimjetpack/class.jetpack.php(2802): Jetpack->admin_screen_list_modules()
    #5 wp-includes/class-wp-hook.php(310): Jetpack->admin_page()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 wp-admin/admin.php(259): do_action()
    #9 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #10 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=jetpack-debugger
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
    • > GET request to /wp-admin/admin.php?page=jetpack-debugger
    • > Deprecated in wp-content/plugins/slimjetpack/class.jetpack-ixr-client.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; Jetpack_IXR_Client has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=jetpack-debugger
    • > Warning in wp-content/plugins/slimjetpack/class.jetpack-ixr-client.php+26
    Declaration of Jetpack_IXR_Client::query() should be compatible with IXR_Client::query(...$args)
    • > GET request to /wp-admin/admin.php?page=jetpack-debugger
    • > Deprecated in wp-content/plugins/slimjetpack/class.jetpack-ixr-client.php+99
    Methods with the same name as their class will not be constructors in a future version of PHP; Jetpack_IXR_ClientMulticall has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 139× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slimjetpack/modules/sharedaddy/sharing-service.php:443
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/slimjetpack/modules/minileven/theme/pub/minileven/content.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Jetpack' not found in wp-content/plugins/slimjetpack/modules/shortcodes.php:45
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/slimjetpack/modules/omnisearch/omnisearch-posts.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slimjetpack/modules/custom-post-types/testimonial.php:299
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slimjetpack/modules/theme-tools/featured-content.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_embed_register_handler() in wp-content/plugins/slimjetpack/modules/shortcodes/vine.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/slimjetpack/modules/shortcodes/scribd.php:45
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-comments-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/slimjetpack/modules/omnisearch/omnisearch-comments.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Error' not found in wp-content/plugins/slimjetpack/class.jetpack-error.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 47 tag instead of maximum 10
You can take inspiration from this readme.txt

slimjetpack/slimjetpack.php 92% from 13 tests

The main file in "Slim Jetpack" v. 2.7.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin183,160 lines of code in 309 files:
LanguageFilesBlank linesComment linesLines of code
PO File4556,43661,863119,337
PHP1528,4568,01337,606
JavaScript462,8171,52417,227
CSS511,2313977,964
HTML91205733
SVG400238
Markdown117044
XML10111

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 148)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity48.53
▷ Minimum class complexity1.00
▷ Maximum class complexity576.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity148.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes133
▷ Abstract classes64.51%
▷ Concrete classes12795.49%
▷ Final classes00.00%
Methods1,526
▷ Static methods28118.41%
▷ Public methods1,16076.02%
▷ Protected methods33421.89%
▷ Private methods322.10%
Functions380
▷ Named functions380100.00%
▷ Anonymous functions00.00%
Constants71
▷ Global constants4461.97%
▷ Class constants2738.03%
▷ Public constants27100.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
188 PNG files occupy 2.33MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_inc/images/rss/silver-small.png0.33KB0.55KB0.00%
_inc/images/screenshots/custom-css.png25.18KB14.36KB▼ 43.00%
_inc/images/automattic.png1.86KB1.82KB▼ 2.36%
modules/sharedaddy/images/digg.png1.42KB0.53KB▼ 62.32%
modules/carousel/images/arrows.png5.26KB4.17KB▼ 20.72%