72% shop-page-manager-for-woocommerce

Code Review | Shop Page Manager for WooCommerce

WordPress plugin Shop Page Manager for WooCommerce scored 72% from 54 tests.

About plugin

  • Plugin page: shop-page-manager...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: Oct 23, 2022
  • Number of updates: 12
  • Update frequency: every 62.3 days
  • Top authors: zamartz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 475 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.21ms] Passed 4 tests

An overview of server-side resources used by Shop Page Manager for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.13 ▼3.31
Dashboard /wp-admin3.31 ▲0.0048.19 ▼1.44
Posts /wp-admin/edit.php3.36 ▲0.0047.87 ▼2.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.84 ▼9.24
Media Library /wp-admin/upload.php3.23 ▲0.0034.74 ▲0.75
Status /wp-admin/admin.php?page=zamartz-status3.0022.71
Settings /wp-admin/admin.php?page=zamartz-settings3.0024.38
Dashboard /wp-admin/admin.php?page=zamartz-admin3.0023.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Shop Page Manager for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.76 ▲0.381.87 ▲0.1243.66 ▲2.25
Dashboard /wp-admin2,206 ▲155.85 ▼0.05106.81 ▲6.5337.24 ▼3.44
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0139.90 ▼0.2134.51 ▼0.52
Add New Post /wp-admin/post-new.php1,533 ▲523.19 ▲0.28667.43 ▲81.2155.80 ▼8.54
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.0196.05 ▼11.4140.66 ▼4.94
Status /wp-admin/admin.php?page=zamartz-status280.440.083.35
Settings /wp-admin/admin.php?page=zamartz-settings280.440.093.63
Dashboard /wp-admin/admin.php?page=zamartz-admin280.440.073.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/shop-page-manager-for-woocommerce/public/partials/wp-shop-page-manager-woo-public-display.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Trait 'Zamartz_General' not found in wp-content/plugins/shop-page-manager-for-woocommerce/admin/zamartz/network/class-zamartz-network-dashboard.php on line 12
    • > PHP Fatal error
      Trait 'Zamartz_General' not found in wp-content/plugins/shop-page-manager-for-woocommerce/admin/zamartz/class-zamartz-dashboard.php on line 12
    • > PHP Fatal error
      Trait 'Zamartz_General' not found in wp-content/plugins/shop-page-manager-for-woocommerce/public/class-wp-shop-page-manager-woo-front.php on line 22
    • > PHP Fatal error
      Trait 'Zamartz_General' not found in wp-content/plugins/shop-page-manager-for-woocommerce/admin/class-zamartz-admin-addons.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Inpsyde\\plugin_dir_path() in wp-content/plugins/shop-page-manager-for-woocommerce/includes/object-hooks-remover.php:16
    • > PHP Fatal error
      Trait 'Zamartz_General' not found in wp-content/plugins/shop-page-manager-for-woocommerce/admin/zamartz/network/class-zamartz-network-settings.php on line 12
    • > PHP Fatal error
      Trait 'Zamartz_General' not found in wp-content/plugins/shop-page-manager-for-woocommerce/admin/class-zamartz-admin-status.php on line 22
    • > PHP Fatal error
      Trait 'Zamartz_General' not found in wp-content/plugins/shop-page-manager-for-woocommerce/admin/class-wp-shop-page-manager-woo-settings.php on line 20
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shop-page-manager-for-woocommerce/admin/partials/wp-shop-page-manager-woo-admin-customizer-display.php:16
    • > PHP Fatal error
      Trait 'Zamartz_HTML_Template' not found in wp-content/plugins/shop-page-manager-for-woocommerce/admin/zamartz/helper/trait-zamartz-rss-methods.php on line 12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=zamartz-status
    • > Network (severe)
    wp-admin/admin.php?page=zamartz-status - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=zamartz-settings
    • > Network (severe)
    wp-admin/admin.php?page=zamartz-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=zamartz-admin
    • > Network (severe)
    wp-admin/admin.php?page=zamartz-admin - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: category, zamartz, shop, woocommerce, plp

shop-page-manager-for-woocommerce/wp-shop-page-manager-woo.php 77% from 13 tests

This is the main PHP file of "Shop Page Manager for WooCommerce" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 278 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shop-page-manager-for-woocommerce.php" instead of "wp-shop-page-manager-woo.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin7,883 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP409772,5415,885
CSS4267581,212
JavaScript584100785
SVG1001

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 192)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.00
▷ Minimum class complexity1.00
▷ Maximum class complexity311.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity192.00
Code structure
Namespaces2
Interfaces0
Traits4
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods193
▷ Static methods21.04%
▷ Public methods18495.34%
▷ Protected methods00.00%
▷ Private methods94.66%
Functions20
▷ Named functions1575.00%
▷ Anonymous functions525.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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
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
admin/zamartz/assets/images/zamartz-icon-menu.png0.43KB0.50KB0.00%
admin/images/dashboard-default.png9.37KB4.10KB▼ 56.26%