84% frontier-query

Code Review | Frontier Query

WordPress plugin Frontier Query scored84%from 54 tests.

About plugin

  • Plugin page: frontier-query
  • Plugin version: 1.6.5
  • PHP compatiblity: 7.4.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2015
  • Latest release: Apr 13, 2023
  • Number of updates: 87
  • Update frequency: every 30.8 days
  • Top authors: finnj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▼3.10ms] Passed 4 tests

This is a short check of server-side resources used by Frontier Query
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6445.00 ▲7.25
Dashboard /wp-admin3.98 ▲0.6449.28 ▼7.55
Posts /wp-admin/edit.php4.03 ▲0.6850.03 ▼2.72
Add New Post /wp-admin/post-new.php6.50 ▲0.6186.18 ▼9.37
Media Library /wp-admin/upload.php3.84 ▲0.6141.84 ▲7.52
Frontier Query /wp-admin/options-general.php?page=frontier-query/admin/frontier-query-admin-general.php3.9137.43

Server storage [IO: ▲0.33MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 10 new options
New WordPress options
widget_frontier-query-widget
db_upgraded
widget_recent-comments
widget_recent-posts
category_children
can_compress_scripts
theysaidso_admin_options
frontier_query_general_options
widget_theysaidso_widget
widget_frontier-search-widget

Browser metrics Passed 4 tests

Frontier Query: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.17 ▼1.241.88 ▲0.1844.03 ▲2.62
Dashboard /wp-admin2,212 ▲215.77 ▲0.8296.76 ▼4.9039.06 ▼3.98
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0333.20 ▼1.3432.04 ▼4.76
Add New Post /wp-admin/post-new.php1,535 ▲1323.51 ▲0.47661.80 ▼8.1154.34 ▲0.69
Media Library /wp-admin/upload.php1,394 ▲64.22 ▲0.0596.93 ▲1.1240.44 ▲0.51
Frontier Query /wp-admin/options-general.php?page=frontier-query/admin/frontier-query-admin-general.php1,9202.0525.9734.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_frontier-search-widget
    • widget_recent-posts
    • widget_recent-comments
    • category_children
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_frontier-query-widget

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 take a closer look at the following
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_id() in wp-content/plugins/frontier-query/forms/fq-search-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/frontier-query/frontier-query.php:15
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/frontier-query/forms/fq-list-form-simple.php:17
    • > PHP Notice
      Undefined variable: fq_info_parms in wp-content/plugins/frontier-query/forms/fq-infobox-form.php on line 128
    • > PHP Notice
      Undefined variable: fq_info_parms in wp-content/plugins/frontier-query/forms/fq-infobox-form.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/frontier-query/forms/fq-list-form-theme.php:6
    • > PHP Notice
      Undefined variable: fq_info_parms in wp-content/plugins/frontier-query/forms/fq-infobox-form.php on line 37
    • > PHP Notice
      Undefined variable: fq_info_parms in wp-content/plugins/frontier-query/forms/fq-infobox-form.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/frontier-query/forms/fq-infobox-form.php on line 12
    • > PHP Notice
      Undefined variable: fq_info_parms in wp-content/plugins/frontier-query/forms/fq-infobox-form.php on line 24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

frontier-query/frontier-query.php Passed 13 tests

The entry point to "Frontier Query" version 1.6.5 is a PHP file that has certain tags in its header comment area
127 characters long description:
Display list and grouping of posts in widgets, posts and pages. Breakdown posts by categories, taxonomies, date, post type etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin5,574 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP272,1091,3924,497
CSS2235140670
PO File1198279407

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity26.33
▷ Minimum class complexity13.00
▷ Maximum class complexity43.00
Average method complexity7.33
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions94
▷ Named functions94100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete.png1.67KB1.59KB▼ 4.74%
images/search.png0.43KB0.44KB0.00%
images/comments.png1.39KB1.28KB▼ 8.40%
images/view.png4.42KB2.07KB▼ 53.29%
images/comment.png2.11KB1.59KB▼ 24.95%