10% access-fotoweb-media

Code Review | FotoWare Wordpress Lite

WordPress plugin FotoWare Wordpress Lite scored10%from 54 tests.

About plugin

  • Plugin page: access-fotoweb-media
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2020
  • Latest release: Apr 5, 2023
  • Number of updates: 39
  • Update frequency: every 28.9 days
  • Top authors: viitorcloudvc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /754 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/access-fotoweb-media/fotoware-main.php+29
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.93MB] [CPU: ▼47.98ms] Passed 4 tests

An overview of server-side resources used by FotoWare Wordpress Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.22 ▼31.88
Dashboard /wp-admin2.07 ▼1.237.02 ▼38.65
Posts /wp-admin/edit.php2.07 ▼1.288.09 ▼38.45
Add New Post /wp-admin/post-new.php2.07 ▼3.818.80 ▼82.93
Media Library /wp-admin/upload.php2.07 ▼1.168.22 ▼27.24

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

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

Browser metrics Passed 4 tests

Checking browser requirements for FotoWare Wordpress Lite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4713.22 ▼1.161.65 ▼0.2540.08 ▼3.86
Dashboard /wp-admin2,227 ▲394.91 ▼0.16101.88 ▼3.3838.36 ▼2.87
Posts /wp-admin/edit.php2,110 ▲212.05 ▲0.0139.67 ▲0.1133.80 ▼0.46
Add New Post /wp-admin/post-new.php1,529 ▼722.03 ▼1.30650.48 ▼36.4052.82 ▼7.11
Media Library /wp-admin/upload.php1,406 ▲214.25 ▲0.05104.60 ▲2.3545.11 ▲0.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/access-fotoweb-media/fotoware-main.php+29
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/access-fotoweb-media/fotoware-selection.php
    • > /wp-content/plugins/access-fotoweb-media/fotoware-logout.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: fw_url in wp-content/plugins/access-fotoweb-media/fotoware-selection.php on line 32
    • > PHP Notice
      Undefined variable: fotoweb_url in wp-content/plugins/access-fotoweb-media/fotoware-selection.php on line 28
    • > PHP Notice
      Undefined index: access_token in wp-content/plugins/access-fotoweb-media/fotoware-selection.php on line 71
    • > PHP Notice
      Undefined variable: client_id in wp-content/plugins/access-fotoweb-media/fotoware-selection.php on line 28
    • > PHP Notice
      Undefined variable: state in wp-content/plugins/access-fotoweb-media/fotoware-selection.php on line 28
    • > PHP Notice
      Undefined variable: redirect_uri in wp-content/plugins/access-fotoweb-media/fotoware-selection.php on line 28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% 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
3 plugin tags: dam, upload image from fotoware, fotoware

access-fotoweb-media/fotoware-media-access.php 92% from 13 tests

"FotoWare Wordpress Lite" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("access-fotoweb-media.php" instead of "fotoware-media-access.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
Everything looks great! No dangerous files found in this plugin18,814 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
SVG37318,192
PHP87193433
CSS1210189

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
7 PNG files occupy 0.38MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fotoweb_icon.png11.06KB6.50KB▼ 41.21%
images/fotoware-logo.png4.41KB4.12KB▼ 6.51%
images/upload-to-fotoware.png54.88KB15.79KB▼ 71.23%
images/fotoware-image-to-editor.png116.29KB42.01KB▼ 63.87%
logout.png0.44KB0.57KB0.00%