10% wp-plc-swissknife

Code Review | WP PLC Swissknife

WordPress plugin WP PLC Swissknife scored10%from 54 tests.

About plugin

  • Plugin page: wp-plc-swissknife
  • Plugin version: 0.4.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Dec 6, 2019
  • Latest release: Feb 9, 2020
  • Number of updates: 10
  • Update frequency: every 6.5 days
  • Top authors: oneplacewp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /664 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-plc-swissknife/includes/Modules/Revisions.php+40
    Constant AUTOSAVE_INTERVAL already defined

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.63ms] Passed 4 tests

Server-side resources used by WP PLC Swissknife
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.29 ▼4.63
Dashboard /wp-admin3.45 ▲0.1549.51 ▼4.36
Posts /wp-admin/edit.php3.57 ▲0.2155.38 ▲14.71
Add New Post /wp-admin/post-new.php6.06 ▲0.1795.62 ▲2.68
Media Library /wp-admin/upload.php3.38 ▲0.1541.63 ▲8.83
WP PLC Swissknife /wp-admin/options-general.php?page=wpplc-swissknife-options3.3734.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP PLC Swissknife
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.26 ▼1.301.83 ▲0.0542.59 ▼7.53
Dashboard /wp-admin2,214 ▲265.80 ▲0.8899.73 ▼5.3939.98 ▼0.75
Posts /wp-admin/edit.php2,100 ▲142.04 ▼0.0142.73 ▲6.0937.29 ▲4.17
Add New Post /wp-admin/post-new.php1,524 ▲1023.17 ▲5.51670.84 ▲25.2752.04 ▲0.62
Media Library /wp-admin/upload.php1,399 ▲174.31 ▲0.12101.32 ▲1.2643.19 ▼2.47
WP PLC Swissknife /wp-admin/options-general.php?page=wpplc-swissknife-options1,1791.7224.5636.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-plc-swissknife/includes/templates/settings.php:14
    • > PHP Warning
      Use of undefined constant WPPLC_SWISSKNIFE_MAIN_FILE - assumed 'WPPLC_SWISSKNIFE_MAIN_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-plc-swissknife/includes/loader.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-plc-swissknife/includes/templates/partials/commentsettings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function OnePlace\\Swissknife\\Modules\\add_action() in wp-content/plugins/wp-plc-swissknife/includes/Modules/Settings.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-plc-swissknife/includes/templates/partials/tweaks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-plc-swissknife/includes/templates/partials/elementor.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-plc-swissknife/includes/templates/partials/gdprsettings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-plc-swissknife/includes/templates/partials/revisionsettings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: cookie law, security, rest, performance, xmlrpc...

wp-plc-swissknife/wpplc-swissknife.php 85% from 13 tests

Analyzing the main PHP file in "WP PLC Swissknife" version 0.4.0
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-plc-swissknife.php" instead of "wpplc-swissknife.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,077 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16172506808
CSS12816156
SVG10170
JavaScript171427
PO File12016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.29
▷ Minimum class complexity2.00
▷ Maximum class complexity28.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes7100.00%
Methods44
▷ Static methods818.18%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png3.71KB3.07KB▼ 17.35%