62% photoframes-and-art-for-woocommerce

Code Review | Photoframes and art for WooCommerce

WordPress plugin Photoframes and art for WooCommerce scored62%from 54 tests.

About plugin

  • Plugin page: photoframes-and-a...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2023
  • Latest release: Apr 3, 2023
  • Number of updates: 7
  • Update frequency: every 1.6 days
  • Top authors: narolainfotech (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /431 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼4.42ms] Passed 4 tests

A check of server-side resources used by Photoframes and art for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3748.19 ▲2.78
Dashboard /wp-admin3.76 ▲0.4559.11 ▲7.23
Posts /wp-admin/edit.php3.81 ▲0.4554.55 ▼5.39
Add New Post /wp-admin/post-new.php6.28 ▲0.3991.41 ▼15.64
Media Library /wp-admin/upload.php3.60 ▲0.3738.36 ▲0.59
Photoframe and Art /wp-admin/admin.php?page=photoandart-settings3.5938.71

Server storage [IO: ▲1.18MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 43 new files
Database: 10 new tables, 8 new options
New tables
wp_photoart_size_pricing
wp_photoart_backgrounds
wp_photoart_paper_type
wp_photoart_fixture
wp_photoart_glass
wp_photoart_paper
wp_photoart_window_mount
wp_photoart_frame
wp_photoart_frame_material
wp_photoart_substrate
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
_photoart_default_product
_photoart_query_inserted
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Photoframes and art for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲15114.68 ▲0.512.08 ▲0.1446.69 ▲5.34
Dashboard /wp-admin2,343 ▲1666.21 ▲0.57112.04 ▲25.6542.79 ▼4.28
Posts /wp-admin/edit.php2,272 ▲1723.37 ▲1.3449.10 ▲7.3334.34 ▼6.02
Add New Post /wp-admin/post-new.php1,537 ▲622.96 ▼0.11576.54 ▼102.3434.33 ▼16.11
Media Library /wp-admin/upload.php1,411 ▲114.09 ▼0.1785.64 ▼18.5644.45 ▲2.22
Photoframe and Art /wp-admin/admin.php?page=photoandart-settings9913.0538.3024.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 10 tables in the database
    • wp_photoart_paper
    • wp_photoart_window_mount
    • wp_photoart_backgrounds
    • wp_photoart_size_pricing
    • wp_photoart_frame
    • wp_photoart_substrate
    • wp_photoart_glass
    • wp_photoart_frame_material
    • wp_photoart_paper_type
    • wp_photoart_fixture
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • theysaidso_admin_options
    • _photoart_query_inserted
    • widget_theysaidso_widget
    • widget_recent-posts
    • _photoart_default_product
    • can_compress_scripts
    • db_upgraded

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
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=photoandart-settings
    • > Notice in wp-content/plugins/photoframes-and-art-for-woocommerce/includes/class-photoart-for-helper-functions.php+268
    Undefined index: tab
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=photoandart-settings
    • > Notice in wp-content/plugins/photoframes-and-art-for-woocommerce/includes/class-photoart-for-helper-functions.php+300
    Undefined index: module

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/photoframes_and_art_for_woocommerce-admin-display.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/photoframes-and-art-for-woocommerce/public/partials/photoframes_and_art_for_woocommerce-public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/glass.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/frames.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/window-mount.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/print-type.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/paper.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/fixture.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/substrate.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/navigation.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photoframes-and-art-for-woocommerce/admin/partials/tabs/general-settings.php:17

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can look at the official readme.txt

photoframes-and-art-for-woocommerce/photoframes_and_art_for_woocommerce.php 85% from 13 tests

The entry point to "Photoframes and art for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("photoframes-and-art-for-woocommerce.php" instead of "photoframes_and_art_for_woocommerce.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 410 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin5,767 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript56388492,679
PHP273301,0612,374
CSS32711714

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity28.10
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods76
▷ Static methods22.63%
▷ Public methods7193.42%
▷ Protected methods00.00%
▷ Private methods56.58%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin