62% wp-frontend

Code Review | WP Frontend

WordPress plugin WP Frontend scored62%from 54 tests.

About plugin

  • Plugin page: wp-frontend
  • Plugin version: 1.0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 30, 2018
  • Latest release: Oct 6, 2018
  • Number of updates: 8
  • Update frequency: every 8.6 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /702 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.74MB] [CPU: ▼40.38ms] Passed 4 tests

An overview of server-side resources used by WP Frontend
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.23 ▼0.2315.76 ▼22.68
Dashboard /wp-admin3.27 ▼0.0318.78 ▼28.99
Posts /wp-admin/edit.php3.27 ▼0.0819.42 ▼28.62
Add New Post /wp-admin/post-new.php3.27 ▼2.6118.25 ▼81.23
Media Library /wp-admin/upload.php3.27 ▲0.0521.74 ▼11.48

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 64 new files
Database: no new tables, 7 new options
New WordPress options
wpfrontend_pages
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Frontend
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,043 ▲29713.26 ▼1.174.05 ▲2.4243.15 ▲2.15
Dashboard /wp-admin2,449 ▲2585.87 ▲0.91106.75 ▲2.4542.53 ▼1.64
Posts /wp-admin/edit.php2,336 ▲2442.13 ▲0.1135.07 ▼2.2034.16 ▲0.90
Add New Post /wp-admin/post-new.php1,747 ▲21217.54 ▼5.68664.04 ▼0.4956.58 ▲7.95
Media Library /wp-admin/upload.php1,632 ▲2474.20 ▲0.03105.59 ▲4.7946.32 ▲3.93
News /wp-admin/admin.php?page=wpfront#/cc-news2,8055.1680.3721.75
Contact Form /wp-admin/admin.php?page=wpfront#/forms/promo-contact-form2,8395.3576.0233.57
Registration Form /wp-admin/admin.php?page=wpfront#/forms/promo-registration-form2,8395.3363.0034.17
All Forms /wp-admin/admin.php?page=wpfront#/2,9605.9579.8235.33
Settings /wp-admin/admin.php?page=wpfront#/settings3,5196.2584.7227.30
Add Form /wp-admin/admin.php?page=wpfront#/forms/form-types2,8675.4358.1525.32
Help /wp-admin/admin.php?page=wpfront#/help2,9335.6071.3233.00
Upgrage to Pro /wp-admin/admin.php?page=wpfront#/get-pro2,8815.3657.0830.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-frontend/shortcodes/dashboard.php+15
    Undefined index: section
  • Zombie WordPress options were found after uninstall: 7 options
    • wpfrontend_pages
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% 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 no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-frontend/data.php
    • > /wp-content/plugins/wp-frontend/templates/form-items.php
    • > /wp-content/plugins/wp-frontend/templates/edit-form.php
    • > /wp-content/plugins/wp-frontend/templates/core/form-builder.php
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_statuses() in wp-content/plugins/wp-frontend/templates/forms.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-frontend/templates/promo-contact-form.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-frontend/form-builder-admin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-frontend/wpfrontend-applications.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_statuses() in wp-content/plugins/wp-frontend/templates/entries.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-frontend/ajax-actions.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Wpfront_Functions' not found in wp-content/plugins/wp-frontend/templates/form-types.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-frontend/news.php:23
    • > PHP Fatal error
      Trait 'Wpfront_Edit' not found in wp-content/plugins/wp-frontend/shortcodes/shortcode.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-frontend/templates/promo-get-pro.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wpfront#/cc-news
    • > Console-api (severe) in unknown
    /wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1 5:10851 TypeError: Cannot read properties of null (reading 'status')at o.eval (eval at xa (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:84572), :3:39)at fn._render (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:32687)at o.i (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:63783)at St.get (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:16005)at St.run (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:16889)at At (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:15026)at Array. (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:11498)at Ke (/wp-content/plugins/wp-frontend/assets/js/vue.min.js?ver=6.3.1:6:10958)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: You are using too many tags: 28 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-frontend/wp-frontend.php 85% from 13 tests

The main PHP script in "WP Frontend" version 1.0.1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin25,752 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript201,3241,58812,595
JSON2006,201
PHP314573454,426
CSS33502,095
LESS11420435

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.43
▷ Minimum class complexity4.00
▷ Maximum class complexity86.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits5
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods101
▷ Static methods3837.62%
▷ Public methods101100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin