72% woo-permalink-manager

Code Review | Premmerce Permalink Manager for WooCommerce

WordPress plugin Premmerce Permalink Manager for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: woo-permalink-man...
  • Plugin version: 2.3.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2017
  • Latest release: Nov 26, 2023
  • Number of updates: 72
  • Update frequency: every 31.6 days
  • Top authors: premmerce (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

50,000+ active /485,370 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲5.44MB] [CPU: ▲20.95ms] 50% from 4 tests

This is a short check of server-side resources used by Premmerce Permalink Manager for WooCommerce
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 2,068.79ms on /wp-admin/admin.php?page=premmerce-url-manager-admin)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.44MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.24 ▲5.7865.61 ▲22.98
Dashboard /wp-admin9.26 ▲5.9279.34 ▲17.59
Posts /wp-admin/edit.php9.26 ▲5.9178.77 ▲29.97
Add New Post /wp-admin/post-new.php10.03 ▲4.14111.23 ▲13.26
Media Library /wp-admin/upload.php9.26 ▲6.0373.05 ▲40.92
Permalink Manager /wp-admin/admin.php?page=premmerce-url-manager-admin9.262,068.79
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2662.13

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 281 new files
Database: no new tables, 11 new options
New WordPress options
premmerce_permalink_manager_db_version
fs_accounts
can_compress_scripts
premmerce_permalink_manager
widget_recent-comments
fs_debug_mode
fs_active_plugins
widget_recent-posts
widget_theysaidso_widget
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Premmerce Permalink Manager for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲12014.11 ▼0.281.58 ▼0.3727.13 ▼16.32
Dashboard /wp-admin2,300 ▲1265.66 ▲0.01104.20 ▲6.3192.19 ▲46.99
Posts /wp-admin/edit.php2,206 ▲1062.75 ▲0.7246.00 ▲8.7539.55 ▲4.25
Add New Post /wp-admin/post-new.php1,591 ▲5623.77 ▲0.54683.33 ▲37.3833.36 ▼22.07
Media Library /wp-admin/upload.php1,499 ▲964.52 ▲0.3498.56 ▲0.9372.64 ▲30.46
Permalink Manager /wp-admin/admin.php?page=premmerce-url-manager-admin1,0322.1429.5456.12
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1382.0530.0826.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/woo-permalink-manager/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 11 options in the database
    • fs_active_plugins
    • widget_theysaidso_widget
    • fs_debug_mode
    • widget_recent-comments
    • can_compress_scripts
    • fs_accounts
    • premmerce_permalink_manager_db_version
    • theysaidso_admin_options
    • premmerce_permalink_manager
    • widget_recent-posts
    • ...

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Interface 'Premmerce\\UrlManager\\Admin\\Tabs\\Base\\TabInterface' not found in wp-content/plugins/woo-permalink-manager/src/Admin/BundleAndSave.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-permalink-manager/woo-permalink-manager.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\UrlManager\\Addons\\BreadcrumbsAddon' not found in wp-content/plugins/woo-permalink-manager/src/Addons/YoastBreadcrumbsAddon.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Premmerce\\UrlManager\\Addons\\AddonInterface' not found in wp-content/plugins/woo-permalink-manager/src/Addons/BreadcrumbsAddon.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

woo-permalink-manager/premmerce-url-manager.php 69% from 13 tests

The main file in "Premmerce Permalink Manager for WooCommerce" v. 2.3.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "3.6.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-permalink-manager.php" instead of "premmerce-url-manager.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin47,914 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PHP1648,52518,14435,802
CSS161,1031639,849
PO File54676081,642
JavaScript854113260
SVG201227
Markdown153070
JSON20064

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity70.70
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces10
Interfaces3
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes00.00%
Methods1,415
▷ Static methods22115.62%
▷ Public methods99770.46%
▷ Protected methods281.98%
▷ Private methods39027.56%
Functions109
▷ Named functions10394.50%
▷ Anonymous functions65.50%
Constants167
▷ Global constants9858.68%
▷ Class constants6941.32%
▷ Public constants69100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
26 PNG files occupy 0.26MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/js/pricing-page/cb5fc4f6ec7ada72e986f6e7dde365bf.png22.92KB3.42KB▼ 85.08%
assets/admin/js/pricing-page/fde48e4609a6ddc11d639fc2421f2afd.png10.97KB5.78KB▼ 47.37%
assets/admin/img/managewp.png8.67KB4.55KB▼ 47.56%
assets/admin/js/pricing-page/4375c4a3ddc6f637c2ab9a2d7220f91e.png9.16KB5.26KB▼ 42.58%
assets/admin/js/pricing-page/fe6924369fdcfe0790df1755f773ff60.png1.21KB0.97KB▼ 19.69%