73% wp-plugin-packer

Code Review | WP Plugin Packer

WordPress plugin WP Plugin Packer scored73%from 54 tests.

About plugin

  • Plugin page: wp-plugin-packer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2015
  • Latest release: Mar 19, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: AZdv (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.15ms] Passed 4 tests

A check of server-side resources used by WP Plugin Packer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.52 ▲4.62
Dashboard /wp-admin3.51 ▲0.2058.86 ▲11.37
Posts /wp-admin/edit.php3.56 ▲0.2055.41 ▲3.54
Add New Post /wp-admin/post-new.php6.02 ▲0.1386.54 ▼9.83
Media Library /wp-admin/upload.php3.34 ▲0.1138.67 ▼2.92
WP Plugin Packer /wp-admin/options-general.php?page=wp-plugin-packer3.3535.72

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
wp-plugin-packer_missing_plugins
db_upgraded
widget_recent-comments
wp-plugin-packer_plugin_packs
recovery_mode_email_last_sent
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Plugin Packer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲20615.01 ▲0.661.70 ▼0.0242.10 ▼1.45
Dashboard /wp-admin2,373 ▲2026.63 ▲1.06126.14 ▲31.8839.45 ▼0.45
Posts /wp-admin/edit.php2,304 ▲2044.03 ▲2.0860.30 ▲23.3030.97 ▼4.52
Add New Post /wp-admin/post-new.php1,552 ▲2623.60 ▲0.54633.15 ▼60.6434.31 ▼16.51
Media Library /wp-admin/upload.php1,433 ▲364.39 ▲0.2690.36 ▼26.5244.36 ▼0.64
WP Plugin Packer /wp-admin/options-general.php?page=wp-plugin-packer7421.8819.8226.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • wp-plugin-packer_plugin_packs
    • widget_recent-posts
    • wp-plugin-packer_missing_plugins
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-plugin-packer
    • > Warning in wp-content/plugins/wp-plugin-packer/admin/class-wp-plugin-packer-admin.php+186
    Creating default object from empty value
    • > GET request to /wp-admin/options-general.php?page=wp-plugin-packer
    • > Notice in wp-content/plugins/wp-plugin-packer/admin/class-wp-plugin-packer-admin.php+181
    Trying to get property 'slug' of non-object
    • > GET request to /wp-admin/options-general.php?page=wp-plugin-packer
    • > Error in wp-content/plugins/wp-plugin-packer/admin/class-wp-plugin-packer-admin.php+114
    Uncaught Error: Cannot use object of type stdClass as array in wp-content/plugins/wp-plugin-packer/admin/class-wp-plugin-packer-admin.php:114
    Stack trace:
    #0 wp-admin/includes/template.php(1771): Wp_Plugin_Packer_Admin->plugin_packs_callback()
    #1 wp-content/plugins/wp-plugin-packer/admin/partials/wp-plugin-packer-admin-display.php(6): do_settings_sections()
    #2 wp-content/plugins/wp-plugin-packer/admin/class-wp-plugin-packer-admin.php(98): require_once('/var/www/wordpr...')
    #3 wp-includes/class-wp-hook.php(310): Wp_Plugin_Packer_Admin->handle_admin_display()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #8 {main}
    thrown

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-plugin-packer/admin/partials/wp-plugin-packer-admin-display.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-plugin-packer
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: wp.media is not a function" "TypeError: wp.media is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-plugin-packer/admin/js/wp-plugin-packer-admin.js?ver=1.0.0:88:18)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wp-plugin-packer
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught TypeError: wp.media is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: plugin group, plugins, packs

wp-plugin-packer/wp-plugin-packer.php Passed 13 tests

The primary PHP file in "WP Plugin Packer" version 1.0.0 is used by WordPress to initiate all plugin functionality
89 characters long description:
Lets you create plugin packs (=groups) to export and import to various WordPress websites

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin757 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10128229511
JavaScript1253176
CSS110370

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.43
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods3389.19%
▷ Protected methods00.00%
▷ Private methods410.81%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin