74% kp-solar-rechner

Code Review | Käuferportal Solarrechner-Plugin

WordPress plugin Käuferportal Solarrechner-Plugin scored 74% from 54 tests.

About plugin

  • Plugin page: kp-solar-rechner
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5
  • WordPress version: 5.8.1
  • First release: May 26, 2013
  • Latest release: Jun 6, 2013
  • Number of updates: 13
  • Update frequency: every 0.8 days
  • Top authors: kaeuferportal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 894 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.64MB] [CPU: ▼185.45ms] Passed 4 tests

A check of server-side resources used by Käuferportal Solarrechner-Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.99 ▼0.8416.52 ▼20.74
Dashboard /wp-admin2.01 ▼1.0411.80 ▼41.26
Posts /wp-admin/edit.php2.02 ▼1.0911.97 ▼34.34
Add New Post /wp-admin/post-new.php2.01 ▼3.4211.69 ▼637.47
Media Library /wp-admin/upload.php2.01 ▼0.9910.03 ▼28.71

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 1 new option
New WordPress options
widget_kp-solar-rechner

Browser metrics Passed 4 tests

Checking browser requirements for Käuferportal Solarrechner-Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲23216.53 ▲1.0119.07 ▲4.9650.53 ▲2.21
Dashboard /wp-admin2,970 ▲396.02 ▼0.09149.69 ▲4.89118.07 ▲9.47
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0077.43 ▲8.5396.35 ▲11.43
Add New Post /wp-admin/post-new.php1,581 ▼10218.50 ▼0.28438.87 ▲37.29145.10 ▲26.85
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.01177.83 ▲18.85126.50 ▼6.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in KP_Solar_Rechner_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_kp-solar-rechner

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/kp-solar-rechner/template.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kp-solar-rechner/kp-solar-rechner.php:30

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: solar, rechner, widget, solaranlage, calculator...

kp-solar-rechner/kp-solar-rechner.php 92% from 13 tests

This is the main PHP file of "Käuferportal Solarrechner-Plugin" version 1.1.0, 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:
  • Description: The description should be shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin828 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1766430
JavaScript23810236
PHP23923162

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/bg.png27.80KB10.34KB▼ 62.82%
assets/img/inline_validation.png1.48KB1.23KB▼ 16.81%
assets/img/button_submit_form.png2.88KB1.88KB▼ 34.51%
assets/img/delta.png0.15KB0.13KB▼ 10.39%
assets/img/switch.png0.53KB0.65KB0.00%