72% icafe-vpp-manager

Code Review | iCafe VPP Manager

WordPress plugin iCafe VPP Manager scored72%from 54 tests.

About plugin

  • Plugin page: icafe-vpp-manager
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 3, 2013
  • Latest release: May 17, 2013
  • Number of updates: 9
  • Update frequency: every 3.4 days
  • Top authors: cnilsson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /942 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼14.19ms] Passed 4 tests

Server-side resources used by iCafe VPP Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.11 ▼0.3524.47 ▼21.58
Dashboard /wp-admin3.61 ▲0.2652.84 ▼11.94
Posts /wp-admin/edit.php3.72 ▲0.3648.00 ▼10.76
Add New Post /wp-admin/post-new.php6.21 ▲0.3287.75 ▼12.46
Media Library /wp-admin/upload.php3.53 ▲0.3039.19 ▼1.18
Program Admins /wp-admin/admin.php?page=icafe_vpp-Program-Facilitator-Admin3.4732.41
Program Manager /wp-admin/admin.php?page=icafe_vpp-Program-Manager-Admin3.5037.59
Self-Serve Config /wp-admin/admin.php?page=icafe_vpp-Config3.5032.92
New Program Config /wp-admin/admin.php?page=icafe_vpp_new_program-Config3.5032.26
Program Facilitators /wp-admin/admin.php?page=icafe_vpp-Manage-VPP-Accounts3.5034.52
Enterprise Owned iTunes Account /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts3.4729.11
iCafe VPP /wp-admin/admin.php?page=icafe_vpp-admin3.5032.07

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: 3 new tables, 32 new options
New tables
wp_icafe_vpp_programs
wp_icafe_vpp_apps
wp_icafe_vpp_vouchers
New WordPress options
global_appleid_sec3_answer
icafe_vpp_facilitator_ids
global_appleid_change_interval
widget_recent-comments
icafe_vpp_current_appleid_pw
db_upgraded
global_appleid_sec2_answer
can_compress_scripts
icafe_vpp_program_manager_itunes_account
icafe_vpp_new_pf_sec_a
...

Browser metrics 50% from 4 tests

A check of browser resources used by iCafe VPP Manager
A great user experience is important, so you should focus on the following
  • Memory: In order to improve user experience, please limit browser memory usage to 75.00MB (currently 122.82MB on /wp-admin/admin.php?page=icafe_vpp-admin)
  • Script duration: Please improve your JavaScript code, lowering total execution time to less than 1,500.00ms (currently 3,536.18ms on /wp-admin/admin.php?page=icafe_vpp-admin)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲15013.62 ▼0.7410.36 ▲8.3142.43 ▲0.01
Dashboard /wp-admin2,238 ▲615.55 ▼0.0998.59 ▲10.3541.44 ▼1.65
Posts /wp-admin/edit.php2,146 ▲462.02 ▲0.0235.44 ▼8.0633.69 ▼8.52
Add New Post /wp-admin/post-new.php1,574 ▲4618.13 ▼5.20648.83 ▼25.3468.30 ▲1.63
Media Library /wp-admin/upload.php1,446 ▲464.20 ▼0.0698.81 ▼20.3442.90 ▼5.96
Program Admins /wp-admin/admin.php?page=icafe_vpp-Program-Facilitator-Admin8492.0425.6828.44
Program Manager /wp-admin/admin.php?page=icafe_vpp-Program-Manager-Admin9482.0122.8727.67
Self-Serve Config /wp-admin/admin.php?page=icafe_vpp-Config9582.0124.3231.35
New Program Config /wp-admin/admin.php?page=icafe_vpp_new_program-Config1,6442.1323.7526.26
Program Facilitators /wp-admin/admin.php?page=icafe_vpp-Manage-VPP-Accounts8932.0526.1625.84
Enterprise Owned iTunes Account /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts1,1312.0122.6539.05
iCafe VPP /wp-admin/admin.php?page=icafe_vpp-admin10,545122.823,536.1896.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Program-Facilitator-Admin
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+1699
    Undefined index: state
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2247
    Undefined variable: qa1
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2248
    Undefined variable: qa2
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2249
    Undefined variable: qa3
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2250
    Undefined variable: qa4
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2251
    Undefined variable: qa5
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2252
    Undefined variable: qa6
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2260
    Undefined variable: qb1
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2261
    Undefined variable: qb2
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2262
    Undefined variable: qb3
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2263
    Undefined variable: qb4
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2264
    Undefined variable: qb5
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2265
    Undefined variable: qb6
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2273
    Undefined variable: qc1
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2274
    Undefined variable: qc2
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2275
    Undefined variable: qc3
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2276
    Undefined variable: qc4
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Notice in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php+2277
    Undefined variable: qc5

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/icafe-vpp-manager/icafe-vpp.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=icafe_vpp-Manage-Global_iTunes-Accounts
    • > Network (severe)
    wp-content/plugins/icafe-vpp-manager/css/img/utilities.gif - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: itunes, vouchers, volume purchase program, app store, icafe...

icafe-vpp-manager/icafe-vpp.php 92% from 13 tests

This is the main PHP file of "iCafe VPP Manager" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("icafe-vpp-manager.php" instead of "icafe-vpp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,330 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP25321652,074
CSS173129
JavaScript31215111
XML30016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin