68% performance-kit

Code Review | Performance Kit

WordPress plugin Performance Kit scored 68% from 54 tests.

About plugin

  • Plugin page: performance-kit
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.6
  • WordPress version: 5.9.2
  • First release: Dec 27, 2020
  • Latest release: Dec 28, 2020
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: atakanoz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 234 total downloads

Benchmarks

Plugin footprint 65% 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: ▲4.63MB] [CPU: ▼271.16ms] Passed 4 tests

An overview of server-side resources used by Performance Kit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.54 ▲5.0391.15 ▲42.75
Dashboard /wp-admin8.56 ▲5.1675.01 ▲41.71
Posts /wp-admin/edit.php8.56 ▲4.9267.58 ▲23.99
Add New Post /wp-admin/post-new.php10.38 ▲3.41125.98 ▼1,177.01
Media Library /wp-admin/upload.php8.56 ▲5.2751.12 ▲26.66
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius8.5654.03

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 211 new files
Database: no new tables, 5 new options
New WordPress options
performance_kit_version
fs_gdpr
fs_accounts
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for Performance Kit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,850 ▲12816.23 ▲0.456.05 ▲0.072.00 ▼0.35
Dashboard /wp-admin2,956 ▲1056.07 ▼0.13118.60 ▼15.41181.47 ▲22.47
Posts /wp-admin/edit.php2,752 ▲583.13 ▼0.1160.57 ▼6.18158.30 ▲11.86
Add New Post /wp-admin/post-new.php1,800 ▲13920.61 ▲3.55384.51 ▼50.59188.43 ▲35.89
Media Library /wp-admin/upload.php1,761 ▲635.72 ▲0.24123.72 ▼12.99219.51 ▲37.96
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4662.7453.71117.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
    • > Notice in wp-content/plugins/performance-kit/freemius/includes/class-freemius.php+8540
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 5 options in the database
    • fs_active_plugins
    • fs_accounts
    • performance_kit_version
    • fs_gdpr
    • fs_debug_mode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/performance-kit/freemius/templates/ajax-loader.php
  • 23× 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 esc_html_e() in wp-content/plugins/performance-kit/admin/partials/kit-woocommerce.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/performance-kit/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/performance-kit/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/performance-kit/admin/modules/woocommerce-module.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/performance-kit/admin/partials/kit-option.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/performance-kit/admin/partials/performance-kit-admin-display.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Performance_Kit_Admin' not found in wp-content/plugins/performance-kit/admin/fields/cdn.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/performance-kit/admin/modules/misc-module.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/performance-kit/admin/modules/wordpress-module.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/performance-kit/admin/fields/settings.php:25

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

performance-kit/performance-kit.php Passed 13 tests

This is the main PHP file of "Performance Kit" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
49 characters long description:
Cherry on top of your speed optimization process.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected39,768 lines of code in 163 files:
LanguageFilesBlank linesComment linesLines of code
PHP1327,82317,17932,586
JSON4005,872
CSS12654420
Sass1361389
JavaScript55495250
Markdown1680214
SVG80037

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity69.76
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,189
▷ Static methods17614.80%
▷ Public methods83970.56%
▷ Protected methods191.60%
▷ Private methods33127.84%
Functions146
▷ Named functions14599.32%
▷ Anonymous functions10.68%
Constants130
▷ Global constants10480.00%
▷ Class constants2620.00%
▷ Public constants26100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/performance-kit.png4.27KB2.06KB▼ 51.73%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%