84% wegner-tools

Code Review | Wegner Tools

WordPress plugin Wegner Tools scored84%from 54 tests.

About plugin

  • Plugin page: wegner-tools
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2+
  • WordPress version: 6.3.1
  • First release: Apr 16, 2022
  • Latest release: Jul 1, 2022
  • Number of updates: 13
  • Update frequency: every 5.9 days
  • Top authors: vonwegner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /396 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.87ms] Passed 4 tests

This is a short check of server-side resources used by Wegner Tools
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0642.86 ▲0.84
Dashboard /wp-admin3.43 ▲0.0853.48 ▼2.85
Posts /wp-admin/edit.php3.54 ▲0.1453.47 ▲1.06
Add New Post /wp-admin/post-new.php6.01 ▲0.0886.84 ▼10.25
Media Library /wp-admin/upload.php3.35 ▲0.0836.00 ▼3.20
Wegner Tools /wp-admin/options-general.php?page=wegner-tools3.3233.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Wegner Tools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,783 ▲2214.39 ▲0.031.75 ▼0.1343.87 ▼1.10
Dashboard /wp-admin2,191 ▲145.64 ▼0.0284.56 ▼15.1937.88 ▼10.89
Posts /wp-admin/edit.php2,093 ▼102.01 ▲0.0135.03 ▼0.3033.85 ▼3.61
Add New Post /wp-admin/post-new.php1,523 ▼323.14 ▲0.12676.65 ▲6.3861.69 ▲10.09
Media Library /wp-admin/upload.php1,396 ▼44.21 ▼0.0298.73 ▼17.8746.23 ▼3.42
Wegner Tools /wp-admin/options-general.php?page=wegner-tools8722.0328.2529.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • wegner_tools_option_name
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wegner-tools/tools/divi-rename-projects.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wegner-tools/tools/divi-image-auto-update.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wegner-tools/tools/feed-include-divi-projects.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wegner-tools/tools/wpsecurity.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wegner-tools/settingsPage.php:315

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tested up to: Invalid plugin version format
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wegner-tools === )
The official readme.txt is a good inspiration

wegner-tools/wegner-tools.php Passed 13 tests

This is the main PHP file of "Wegner Tools" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
69 characters long description:
A small tools for enabling and disabling code snippets via checkboxes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin575 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP77270550
Markdown112025

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected