67% woo-simple-frontend-manager

Code Review | WooCommerce Simple Frontend Manager

WordPress plugin WooCommerce Simple Frontend Manager scored67%from 54 tests.

About plugin

  • Plugin page: woo-simple-fronte...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Nov 5, 2018
  • Latest release: Mar 18, 2022
  • Number of updates: 10
  • Update frequency: every 125.7 days
  • Top authors: JoseVega (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,252 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.64MB] [CPU: ▼2.99ms] 75% from 4 tests

Analyzing server-side resources used by WooCommerce Simple Frontend Manager
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,813.25ms on /wp-admin/admin.php?page=wpatof_welcome_page)
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6347.34 ▲5.94
Dashboard /wp-admin3.98 ▲0.6461.13 ▼1.43
Posts /wp-admin/edit.php4.04 ▲0.6856.64 ▲2.99
Add New Post /wp-admin/post-new.php6.51 ▲0.6390.11 ▼19.47
Media Library /wp-admin/upload.php3.91 ▲0.6845.00 ▲8.48
Simple Frontend Manager /wp-admin/admin.php?page=wpatof_welcome_page4.241,813.25
Simple Frontend Manager /wp-admin/admin.php?page=wpatof_whats_new3.8739.76
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius4.2240.24

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 216 new files
Database: no new tables, 11 new options
New WordPress options
fs_accounts
wpatof_welcome_redirect
theysaidso_admin_options
widget_recent-posts
fs_active_plugins
db_upgraded
fs_gdpr
widget_recent-comments
fs_debug_mode
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Simple Frontend Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.31 ▼0.351.67 ▼0.1632.58 ▼6.77
Dashboard /wp-admin2,240 ▲595.55 ▼0.1692.02 ▼6.9386.73 ▲42.76
Posts /wp-admin/edit.php2,161 ▲642.00 ▲0.0138.26 ▼0.1336.97 ▲1.56
Add New Post /wp-admin/post-new.php1,580 ▲4518.17 ▼4.62735.11 ▲51.9766.35 ▲8.44
Media Library /wp-admin/upload.php1,460 ▲634.27 ▲0.1299.03 ▲0.3783.06 ▲38.42
Simple Frontend Manager /wp-admin/admin.php?page=wpatof_welcome_page1,0241.7026.6248.98
Simple Frontend Manager /wp-admin/admin.php?page=wpatof_whats_new8291.6625.7526.47
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,1071.8928.1728.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/inc/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 11 options in the database
    • fs_active_plugins
    • theysaidso_admin_options
    • db_upgraded
    • fs_debug_mode
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • wpatof_welcome_redirect
    • can_compress_scripts
    • fs_accounts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/views/frontend/log-in-message.php
  • 29× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: login_form in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/views/frontend/log-in-message.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VG_Admin_To_Frontend_Obj() in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/inc/change-texts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-simple-frontend-manager/index.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/inc/table-columns-manager.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/inc/show-own-posts.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/views/frontend/already-logged-in-message.php:2
    • > PHP Notice
      Undefined variable: login_message in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/views/frontend/log-in-message.php on line 46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/views/frontend/wrong-permissions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/inc/global-dashboard.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/woo-simple-frontend-manager/vendor/display-admin-page-on-frontend/vendor/vg-plugin-sdk/views/page-template.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please describe screenshot #2 in woo-simple-frontend-manager/assets to your readme.txt
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-simple-frontend-manager/index.php 92% from 13 tests

The main PHP script in "WooCommerce Simple Frontend Manager" version 1.0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-simple-frontend-manager.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin41,601 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
PHP1377,91116,40035,587
PO File47249684,118
JavaScript61702091,503
CSS14129393

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity83.89
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods1,322
▷ Static methods18313.84%
▷ Public methods97273.52%
▷ Protected methods151.13%
▷ Private methods33525.34%
Functions105
▷ Named functions10499.05%
▷ Anonymous functions10.95%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/display-admin-page-on-frontend/assets/imgs/logo.png31.48KB12.71KB▼ 59.61%
vendor/display-admin-page-on-frontend/assets/imgs/toolbar-item-screenshot.png17.46KB6.76KB▼ 61.28%
vendor/display-admin-page-on-frontend/inc/freemius/assets/img/display-admin-page-on-frontend.png7.52KB3.61KB▼ 52.01%
vendor/display-admin-page-on-frontend/assets/imgs/wp-admin-icon.png0.80KB1.07KB0.00%
vendor/display-admin-page-on-frontend/inc/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%