10% portrait-archiv-shop

Code Review | Portrait-Archiv.com Photostore

WordPress plugin Portrait-Archiv.com Photostore scored 10% from 54 tests.

About plugin

  • Plugin page: portrait-archiv-shop
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 5.8.1
  • First release: Dec 10, 2013
  • Latest release: Nov 26, 2019
  • Number of updates: 489
  • Update frequency: every 4.5 days
  • Top authors: tschiffler (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 3,625 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/portrait-archiv-shop/portraitarchiv-connector.php+24
    Trying to get property 'token' of non-object

Server metrics [RAM: ▼0.57MB] [CPU: ▲213.71ms] 50% from 4 tests

This is a short check of server-side resources used by Portrait-Archiv.com Photostore
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 2,543.72ms on /wp-admin/admin.php?page=pawps_admin_menu_anleitung)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 213.71ms on /wp-admin/admin.php?page=pawps_admin_menu_anleitung)
PageMemory (MB)CPU Time (ms)
Home /3.06 ▲0.2241.49 ▲5.81
Dashboard /wp-admin3.08 ▲0.03529.44 ▲481.89
Posts /wp-admin/edit.php3.08 ▼0.02539.20 ▲491.96
Add New Post /wp-admin/post-new.php3.08 ▼2.35542.65 ▼124.81
Media Library /wp-admin/upload.php3.08 ▲0.082,536.84 ▲2,502.46
Portrait-Archiv /wp-admin/admin.php?page=pawps_admin_menu_mainpage3.08556.09
Anmeldung /wp-admin/admin.php?page=pawps_admin_menu_anmeldung3.08542.51
Verbindungsdaten /wp-admin/admin.php?page=pawps_admin_menu_grundeinstellungen3.082,537.53
Galerien /wp-admin/admin.php?page=pawps_admin_menu_shootings3.08533.93
Anleitung /wp-admin/admin.php?page=pawps_admin_menu_anleitung3.082,543.72

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 57 new files
Database: 2 new tables, 10 new options
New tables
wp_PAWPS_CONFIG
wp_PAWPS_SHOOTINGS
New WordPress options
PAWPS_CFG_IMGCOUNT
PAWPS_DB_VERSION
PAWPS_HASH_REMOTE
PAWPS_HASH
PAWPS_USERID
PAWPS_SYSTEMCOUNTRY
PAWPS_LASTUPDATE_SHOOTINGS
PAWPS_CFG_BOOTSTR_PUB
PAWPS_CFG_BOOTSTR_ADMIN
PAWPS_CRONJOB

Browser metrics Passed 4 tests

A check of browser resources used by Portrait-Archiv.com Photostore
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,879 ▲28316.36 ▲0.7415.12 ▲5.0073.53 ▲30.43
Dashboard /wp-admin3,023 ▲925.99 ▲0.02147.93 ▼15.72102.71 ▼4.04
Posts /wp-admin/edit.php2,803 ▲642.62 ▼0.2269.15 ▼0.2270.33 ▼18.51
Add New Post /wp-admin/post-new.php1,729 ▲4618.60 ▲0.07414.46 ▲7.29126.98 ▲22.19
Media Library /wp-admin/upload.php1,811 ▲45.04 ▲0.04140.28 ▼15.41144.56 ▲29.17
Portrait-Archiv /wp-admin/admin.php?page=pawps_admin_menu_mainpage1,1482.1062.6262.25
Anmeldung /wp-admin/admin.php?page=pawps_admin_menu_anmeldung1,1182.2258.5856.53
Verbindungsdaten /wp-admin/admin.php?page=pawps_admin_menu_grundeinstellungen1,2262.4754.4673.12
Galerien /wp-admin/admin.php?page=pawps_admin_menu_shootings9212.1334.8143.93
Anleitung /wp-admin/admin.php?page=pawps_admin_menu_anleitung1,2732.3464.9765.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/portrait-archiv-shop/portraitarchiv-connector.php+4
    Undefined index: PAWPS_CONNECTIONWORKING
  • Zombie WordPress options were found after uninstall: 4 options
    • PAWPS_CFG_IMGCOUNT
    • PAWPS_CFG_BOOTSTR_PUB
    • PAWPS_SYSTEMCOUNTRY
    • PAWPS_CFG_BOOTSTR_ADMIN

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pawps_admin_menu_anleitung
    • > Notice in wp-content/plugins/portrait-archiv-shop/portraitarchiv-connector.php+15
    Trying to get property 'success' of non-object

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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/portrait-archiv-shop/js/baseFunctions.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/portrait-archiv-shop/portraitarchiv-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pawps_getUrl() in wp-content/plugins/portrait-archiv-shop/js/warenkorbList.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/portrait-archiv-shop/portraitarchiv-store.php:18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/portrait-archiv-shop/portraitarchiv-configure.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/portrait-archiv-shop/js/imageDetails.php:3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/portrait-archiv-shop/portraitarchiv-configure.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pawps_getUrl() in wp-content/plugins/portrait-archiv-shop/js/galeriePublicList.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pawps_getUrl() in wp-content/plugins/portrait-archiv-shop/js/warenkorbBox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/portrait-archiv-shop/js/galerieList.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: foto, bild, store, verkaufen, portrait-archiv...

portrait-archiv-shop/portraitarchiv-store.php 85% from 13 tests

Analyzing the main PHP file in "Portrait-Archiv.com Photostore" version 3.7
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("portrait-archiv-shop.php" instead of "portraitarchiv-store.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)

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
No dangerous file extensions were detected4,051 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript64356122,161
PHP173681301,782
JSON20058
XML30040
INI3006
CSS2054

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.38MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/eye.png1.00KB0.55KB▼ 45.42%
resources/logo.png1.37KB1.24KB▼ 9.54%
resources/unlock_stroke.png0.30KB0.29KB▼ 5.16%
resources/docu/pawps_einrichten_2.png174.57KB53.75KB▼ 69.21%
resources/pencil.png1.07KB0.52KB▼ 51.05%