83% pz-frontend-manager

Code Review | PZ Frontend Manager

WordPress plugin PZ Frontend Manager scored83%from 54 tests.

About plugin

  • Plugin page: pz-frontend-manager
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 26, 2023
  • Latest release: Jul 24, 2023
  • Number of updates: 17
  • Update frequency: every 8.8 days
  • Top authors: projectzealous01 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /413 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.80MB] [CPU: ▼5.26ms] Passed 4 tests

A check of server-side resources used by PZ Frontend Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7743.28 ▼2.80
Dashboard /wp-admin4.12 ▲0.7853.76 ▼7.84
Posts /wp-admin/edit.php4.18 ▲0.8253.33 ▲3.14
Add New Post /wp-admin/post-new.php6.71 ▲0.8286.77 ▼13.52
Media Library /wp-admin/upload.php4.05 ▲0.8240.91 ▲10.44

Server storage [IO: ▲4.35MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Illegal file modification found: 1 file (0.99KB) outside of "wp-content/plugins/pz-frontend-manager/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/disable-plugins.php
Filesystem: 141 new files
Database: no new tables, 8 new options
New WordPress options
pzfm_dashboard
theysaidso_admin_options
widget_theysaidso_widget
pzfm-activation
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by PZ Frontend Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,711 ▼3513.90 ▼0.787.80 ▲5.7042.51 ▲0.54
Dashboard /wp-admin2,209 ▲214.85 ▼1.01113.90 ▼6.9744.57 ▲1.24
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0141.07 ▲5.8436.42 ▲2.82
Add New Post /wp-admin/post-new.php1,517 ▲317.38 ▼0.19601.10 ▼67.6261.92 ▲3.52
Media Library /wp-admin/upload.php1,391 ▲64.21 ▲0.02104.82 ▲0.0041.97 ▼3.93

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • pzfm-activation
    • pzfm_dashboard
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 43× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_footer() in wp-content/plugins/pz-frontend-manager/templates/footer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pz-frontend-manager/templates/nav-menu.tpl.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pz-frontend-manager/templates/emails/email-lost-password.tpl.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/pz-frontend-manager/templates/settings/license-key-settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/pz-frontend-manager/templates/registration-form.tpl.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/pz-frontend-manager/templates/emails/email-create-acount.tpl.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/pz-frontend-manager/templates/users/profile.tpl.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pz-frontend-manager/templates/emails/email-proof-of-payment.tpl.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pz-frontend-manager/templates/settings/logo-banner-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pz-frontend-manager/templates/emails/email-registration-confirmation.tpl.php:9

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #2, #3, #4, #5, #6, #7, #8, #9 in pz-frontend-manager/assets to your readme.txt
You can look at the official readme.txt

pz-frontend-manager/pz-frontend-manager.php 85% from 13 tests

The primary PHP file in "PZ Frontend Manager" version 1.0.5 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 317 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin15,568 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP501961356,423
CSS132,5251006,128
JavaScript18871703,017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity46.50
▷ Minimum class complexity7.00
▷ Maximum class complexity139.00
Average method complexity7.67
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
Functions210
▷ Named functions20296.19%
▷ Anonymous functions83.81%
Constants10
▷ Global constants10100.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
34 PNG files occupy 0.45MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/email-icons/facebook.png1.86KB1.29KB▼ 30.34%
assets/images/icons/gbs-user-mngmt-icon.png2.70KB2.03KB▼ 24.75%
assets/images/icons/upload.png0.96KB0.84KB▼ 13.17%
assets/images/email-icons/youtube.png2.02KB1.34KB▼ 33.43%
assets/images/icons/gbs-posts-icon.png2.01KB1.50KB▼ 25.19%