78% alterskontrollede-plugin

Code Review | Alterskontrolle.de Plugin

WordPress plugin Alterskontrolle.de Plugin scored78%from 54 tests.

About plugin

  • Plugin page: alterskontrollede...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 12, 2012
  • Latest release: Jun 4, 2020
  • Number of updates: 85
  • Update frequency: every 34.1 days
  • Top authors: wondocash (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,006 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.05MB] [CPU: ▼6.56ms] Passed 4 tests

Server-side resources used by Alterskontrolle.de Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.95 ▼10.36
Dashboard /wp-admin3.35 ▲0.0544.89 ▼5.39
Posts /wp-admin/edit.php3.40 ▲0.0544.90 ▼5.68
Add New Post /wp-admin/post-new.php5.95 ▲0.0793.69 ▼4.80
Media Library /wp-admin/upload.php3.27 ▲0.0532.85 ▼1.75
Alterskontrolle.de /wp-admin/options-general.php?page=alterskontrolle.de3.3635.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
alterskontrolle_de_options
theysaidso_admin_options
can_compress_scripts
widget_ak_widget_akde
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Alterskontrolle.de Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.24 ▼0.992.24 ▲0.3439.99 ▼7.98
Dashboard /wp-admin2,213 ▲255.82 ▼0.02102.73 ▼2.1740.07 ▲0.03
Posts /wp-admin/edit.php2,099 ▲101.99 ▼0.0036.04 ▼4.6931.89 ▼3.40
Add New Post /wp-admin/post-new.php6,263 ▲4,71919.61 ▲1.42855.49 ▲248.7383.47 ▲29.38
Media Library /wp-admin/upload.php1,392 ▲74.18 ▲0.0194.34 ▼15.4040.30 ▼4.10
Alterskontrolle.de /wp-admin/options-general.php?page=alterskontrolle.de2,2027.92172.1778.99

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_ak_widget_akde
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • alterskontrolle_de_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'ak_linktyp' of non-object in wp-content/plugins/alterskontrollede-plugin/templates/ak_tor.php on line 5
    • > PHP Notice
      Trying to get property 'abo_id' of non-object in wp-content/plugins/alterskontrollede-plugin/templates/tpl_tor.php on line 14
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/alterskontrollede-plugin/templates/tpl_tor.php on line 14
    • > PHP Notice
      Trying to get property 'abo_id' of non-object in wp-content/plugins/alterskontrollede-plugin/templates/abo_tor.php on line 4
    • > PHP Notice
      Trying to get property 'ak_wid' of non-object in wp-content/plugins/alterskontrollede-plugin/templates/abo_tor.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/alterskontrollede-plugin/templates/abo_tor.php:11
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/alterskontrollede-plugin/templates/tpl_tor.php on line 5
    • > PHP Warning
      include(): Failed opening 'alterskontrolle_dePlugin_PATHclasses/functions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/alterskontrollede-plugin/classes/inc.php on line 3
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/alterskontrollede-plugin/templates/ak_tor.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/alterskontrollede-plugin/templates/ak_tor.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=alterskontrolle.de
    • > Network (severe)
    wp-content/plugins/alterskontrolle.de/pics/before.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=alterskontrolle.de
    • > Network (severe)
    wp-content/plugins/alterskontrolle.de/pics/after.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Admin Panel - Einstellungen), #2 (Shortcode Button), #3 (Metabox - Abo schützen), #4 (Metabox - Alterskontrolle / Site-ID), #5 (Tor mit Beitrag/Seite Schutz), #6 (Tor mit Shortcode Bereichs-Schutz)
You can look at the official readme.txt

alterskontrollede-plugin/ak.php 85% from 13 tests

This is the main PHP file of "Alterskontrolle.de Plugin" version 1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 269 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("alterskontrollede-plugin.php" instead of "ak.php")

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
There were no executable files found in this plugin1,095 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP731348948
CSS216080
JavaScript222167

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.56
Average class complexity46.33
▷ Minimum class complexity2.00
▷ Maximum class complexity80.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pics/before.png5.75KB4.86KB▼ 15.46%
pics/after.png5.77KB4.90KB▼ 15.16%