67% passkit-manager

Code Review | PassKit Manager

WordPress plugin PassKit Manager scored 67% from 53 tests.

About plugin

  • Plugin page: passkit-manager
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5
  • WordPress version: 5.8.1
  • First release: May 29, 2013
  • Latest release: Jun 20, 2013
  • Number of updates: 5
  • Update frequency: every 5.6 days
  • Top authors: pkosterman (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

10+ active / 873 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: ▼1.89MB] [CPU: ▼317.95ms] Passed 4 tests

Analyzing server-side resources used by PassKit Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼0.985.10 ▼20.92
Dashboard /wp-admin1.76 ▼1.294.97 ▼38.20
Posts /wp-admin/edit.php1.76 ▼1.344.81 ▼43.79
Add New Post /wp-admin/post-new.php1.76 ▼3.675.44 ▼1,155.34
Media Library /wp-admin/upload.php1.76 ▼1.245.01 ▼34.47
Update pass /wp-admin/admin.php?page=passkit-manager/inc/passkit-update-pass-admin-page.php1.765.14
Settings /wp-admin/admin.php?page=passkit-manager/inc/passkit-settings-admin-page.php1.766.03
Templates /wp-admin/admin.php?page=passkit-manager/inc/passkit-templates-admin-page.php1.766.38
Issue new pass /wp-admin/admin.php?page=passkit-manager/inc/passkit-issue-new-pass-admin-page.php1.764.92
Pass records /wp-admin/admin.php?page=passkit-manager/inc/passkit-pass-records-admin-page.php1.764.48
Template settings /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php1.766.00

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: 1 new table, no new options
New tables
wp_passkit_manager_templates

Browser metrics Passed 4 tests

Checking browser requirements for PassKit Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,682 ▲10015.88 ▲0.369.11 ▲1.8648.53 ▲2.97
Dashboard /wp-admin2,953 ▲1035.94 ▲0.09130.21 ▼0.11136.11 ▲26.41
Posts /wp-admin/edit.php2,737 ▲312.62 ▼0.0762.32 ▼2.9686.92 ▼9.27
Add New Post /wp-admin/post-new.php1,872 ▲1917.72 ▼1.45358.65 ▼20.19108.26 ▲2.42
Media Library /wp-admin/upload.php1,746 ▼265.02 ▼0.02125.15 ▼31.42128.50 ▲10.57
Update pass /wp-admin/admin.php?page=passkit-manager/inc/passkit-update-pass-admin-page.php1,0172.0851.6860.55
Settings /wp-admin/admin.php?page=passkit-manager/inc/passkit-settings-admin-page.php1,0682.0949.8757.52
Templates /wp-admin/admin.php?page=passkit-manager/inc/passkit-templates-admin-page.php1,0182.0851.8758.42
Issue new pass /wp-admin/admin.php?page=passkit-manager/inc/passkit-issue-new-pass-admin-page.php1,0142.0552.9353.71
Pass records /wp-admin/admin.php?page=passkit-manager/inc/passkit-pass-records-admin-page.php1,0252.0555.9653.11
Template settings /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php1,0172.0652.4653.11

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
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the passkit_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the passkit_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > User deprecated in wp-includes/functions.php+5586
    contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method pkManagerPluginOptions::passkit_manager_plugin_help() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-pass-records-admin-page.php
    • > Notice in wp-content/plugins/passkit-manager/inc/passkit-pass-records-admin-page.php+8
    Undefined index: template_id
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > Notice in wp-content/plugins/passkit-manager/inc/passkit-template-settings-admin-page.php+7
    Undefined index: t
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-settings-admin-page.php
    • > Notice in wp-content/plugins/passkit-manager/inc/passkit-settings-admin-page.php+19
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-templates-admin-page.php
    • > Warning in wp-content/plugins/passkit-manager/inc/passkit-templates-admin-page.php+193
    Declaration of Templates_List_Table::prepare_items($pk) should be compatible with WP_List_Table::prepare_items()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > Notice in wp-content/plugins/passkit-manager/inc/passkit-template-settings-admin-page.php+7
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-pass-records-admin-page.php
    • > Warning in wp-content/plugins/passkit-manager/inc/passkit-pass-records-admin-page.php+204
    Declaration of Passes_List_Table::prepare_items($pk) should be compatible with WP_List_Table::prepare_items()

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/passkit-manager/inc/passkit-help-admin-page.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/passkit-manager/inc/passkit-update-pass-admin-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/passkit-manager/passkit-manager.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/passkit-manager/inc/passkit-settings-admin-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/passkit-manager/inc/passkit-pass-records-admin-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/passkit-manager/inc/passkit-templates-admin-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/passkit-manager/inc/passkit-issue-new-pass-admin-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/passkit-manager/inc/passkit-template-settings-admin-page.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=passkit-manager/inc/passkit-template-settings-admin-page.php
    • > Network (severe)
    wp-content/plugins/passkit_manager/css/style.css?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: passbook, boarding passes, coupons, etickets, passkit...

passkit-manager/passkit-manager.php Passed 13 tests

"PassKit Manager" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
"PassKit Manager" plugin by PassKit Inc, can be used to manage PassKit templates & passes for Apple Passbook.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,320 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP93019011,310
CSS11010

PHP code Passed 2 tests

Analyzing 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 complexity37.75
▷ Minimum class complexity4.00
▷ Maximum class complexity99.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods46
▷ Static methods715.22%
▷ Public methods4291.30%
▷ Protected methods00.00%
▷ Private methods48.70%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/passkit-icon32x32.png1.51KB1.40KB▼ 7.42%
img/passkit-icon-bw32x32.png0.59KB1.00KB0.00%