78% zpc-update-products

Code Review | ZPC UPDATE PRODUCTS

WordPress plugin ZPC UPDATE PRODUCTS scored78%from 54 tests.

About plugin

  • Plugin page: zpc-update-products
  • Plugin version: 0.65
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2022
  • Latest release: Nov 18, 2022
  • Number of updates: 6
  • Update frequency: every 8.3 days
  • Top authors: zittergie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /166 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
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼7.15ms] Passed 4 tests

Analyzing server-side resources used by ZPC UPDATE PRODUCTS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2741.57 ▼6.21
Dashboard /wp-admin3.47 ▲0.1646.79 ▼0.36
Posts /wp-admin/edit.php3.52 ▲0.1645.00 ▼6.47
Add New Post /wp-admin/post-new.php6.05 ▲0.1684.82 ▼15.54
Media Library /wp-admin/upload.php3.39 ▲0.1635.28 ▲2.87
ZPC Update Products /wp-admin/edit.php?post_type=product&page=zpc-updateproducts3.1525.04

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for ZPC UPDATE PRODUCTS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.161.66 ▼0.4743.91 ▲1.02
Dashboard /wp-admin2,209 ▲185.90 ▼0.03112.14 ▼0.7742.91 ▼1.41
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0135.40 ▼2.5234.75 ▼0.72
Add New Post /wp-admin/post-new.php1,533 ▼123.18 ▲0.07661.10 ▼10.6657.03 ▲4.46
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0797.51 ▼0.8744.90 ▼0.95
ZPC Update Products /wp-admin/edit.php?post_type=product&page=zpc-updateproducts280.440.073.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/zpc-update-products/zpc-updateproducts.php on line 27
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zpc-update-products/zpc-updateproducts.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zpc-update-products/includes/functions.php:12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zpc-update-products/zpc-updateproducts.php on line 26
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/zpc-update-products/zpc-updateproducts.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/zpc-update-products/zpc-updateproducts.php:28
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/zpc-update-products/zpc-updateproducts.php on line 26
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/upgrade.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/zpc-update-products/zpc-updateproducts.php on line 27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=product&page=zpc-updateproducts
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=zpc-updateproducts - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: bulk edit, sale price, ecommerce, batch, woocommerce...

zpc-update-products/zpc-updateproducts.php 85% from 13 tests

The principal PHP file in "ZPC UPDATE PRODUCTS" v. 0.65 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("zpc-update-products.php" instead of "zpc-updateproducts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,239 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21511521,076
CSS1320163

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity13.60
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.14MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/undo.png0.39KB0.41KB0.00%
images/accept.png0.28KB0.33KB0.00%
images/close.png0.27KB0.30KB0.00%
images/header-zittergie2.png140.42KB56.52KB▼ 59.75%
images/edit.png6.63KB0.47KB▼ 92.85%