63% premmerce-redirect-manager

Code Review | Premmerce Redirect Manager

WordPress plugin Premmerce Redirect Manager scored63%from 54 tests.

About plugin

  • Plugin page: premmerce-redirec...
  • Plugin version: 1.0.12
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Aug 23, 2023
  • Number of updates: 25
  • Update frequency: every 82.0 days
  • Top authors: premmerce (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /13,172 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.00MB] [CPU: ▲30.01ms] 75% from 4 tests

Server-side resources used by Premmerce Redirect Manager
Please take the time to fix the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,709.27ms on /wp-admin/admin.php?page=premmerce-redirect-manager)
PageMemory (MB)CPU Time (ms)
Home /8.84 ▲5.3861.41 ▲23.27
Dashboard /wp-admin8.86 ▲5.5670.55 ▲29.26
Posts /wp-admin/edit.php8.86 ▲5.5181.00 ▲37.54
Add New Post /wp-admin/post-new.php9.43 ▲3.54120.96 ▲30.39
Media Library /wp-admin/upload.php8.86 ▲5.6373.68 ▲37.10
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8656.68
Redirects /wp-admin/admin.php?page=premmerce_redirect8.8661.08
Premmerce Redirect Manager /wp-admin/admin.php?page=premmerce-redirect-manager8.861,709.27

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 222 new files
Database: 1 new table, 9 new options
New tables
wp_premmerce_redirects
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
fs_debug_mode
fs_accounts
db_upgraded
fs_active_plugins
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Premmerce Redirect Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.23 ▼0.971.85 ▲0.1327.68 ▼9.97
Dashboard /wp-admin2,272 ▲865.86 ▲0.91107.86 ▼13.1142.54 ▼3.17
Posts /wp-admin/edit.php2,151 ▲622.05 ▲0.0441.58 ▲4.4538.50 ▲5.07
Add New Post /wp-admin/post-new.php1,550 ▲2218.30 ▼0.14640.64 ▼9.4257.42 ▲1.66
Media Library /wp-admin/upload.php1,450 ▲654.22 ▲0.01101.41 ▲3.2247.05 ▲3.64
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1121.7030.3830.89
Redirects /wp-admin/admin.php?page=premmerce_redirect1,3962.3540.9633.67
Premmerce Redirect Manager /wp-admin/admin.php?page=premmerce-redirect-manager1,0171.7127.8255.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/premmerce-redirect-manager/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 1 table
    • wp_premmerce_redirects
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • fs_debug_mode
    • widget_recent-comments
    • fs_active_plugins
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_accounts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/premmerce-redirect-manager/src/Admin/RedirectsTable.php:12

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 Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: 301 redirects manager, woocommerce redirect manager, wordpress redirect manager

premmerce-redirect-manager/premmerce-redirect.php 77% from 13 tests

The entry point to "Premmerce Redirect Manager" version 1.0.12 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("premmerce-redirect-manager.php" instead of "premmerce-redirect.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 163 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin35,832 lines of code in 171 files:
LanguageFilesBlank linesComment linesLines of code
PHP1458,42817,94934,834
JavaScript54759352
Markdown21210284
PO File2114198250
JSON20064
CSS157048

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity79.19
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods1,374
▷ Static methods21915.94%
▷ Public methods95869.72%
▷ Protected methods241.75%
▷ Private methods39228.53%
Functions103
▷ Named functions9996.12%
▷ Anonymous functions43.88%
Constants150
▷ Global constants9865.33%
▷ Class constants5234.67%
▷ Public constants52100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/premmerce-redirect-manager.png5.82KB3.21KB▼ 44.87%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%