84% frontier-post

Code Review | Frontier Post

WordPress plugin Frontier Post scored84%from 54 tests.

About plugin

  • Plugin page: frontier-post
  • Plugin version: 6.1
  • PHP compatiblity: 7.4.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2013
  • Latest release: Apr 13, 2023
  • Number of updates: 364
  • Update frequency: every 10.1 days
  • Top authors: finnj (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

1,000+ active /95,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.49ms] Passed 4 tests

Server-side resources used by Frontier Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.63 ▼0.03
Dashboard /wp-admin3.42 ▲0.1248.43 ▼1.55
Posts /wp-admin/edit.php3.54 ▲0.1849.65 ▲3.51
Add New Post /wp-admin/post-new.php6.00 ▲0.1285.43 ▼15.87
Media Library /wp-admin/upload.php3.34 ▲0.1136.87 ▲4.58
Export/Import /wp-admin/admin.php?page=frontier_post_admin_option_exp3.3137.02
Frontier Post Advanced /wp-admin/admin.php?page=frontier_post_admin_advanced3.3134.15
Frontier Post Settings /wp-admin/admin.php?page=frontier_admin_menu3.3334.02
Debug Info /wp-admin/admin.php?page=frontier_post_admin_list_capabilities3.3135.54
Frontier Post Capabilities /wp-admin/admin.php?page=frontier_post_admin_capabilities3.3240.21

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 75 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
frontier_post_capabilities
widget_frontier-my-approvals
widget_frontier-my-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
frontier_post_general_options
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Frontier Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10813.17 ▼1.131.90 ▲0.0342.45 ▼7.99
Dashboard /wp-admin2,247 ▲595.76 ▲0.8398.70 ▼5.5240.24 ▼7.22
Posts /wp-admin/edit.php2,133 ▲442.01 ▼0.0340.09 ▲0.5437.74 ▼0.73
Add New Post /wp-admin/post-new.php1,547 ▲2817.42 ▼5.99694.01 ▲93.4752.68 ▼3.02
Media Library /wp-admin/upload.php1,429 ▲444.18 ▼0.0296.19 ▼13.3140.62 ▼4.50
Export/Import /wp-admin/admin.php?page=frontier_post_admin_option_exp1,3802.0623.8137.86
Frontier Post Advanced /wp-admin/admin.php?page=frontier_post_admin_advanced1,1742.0322.3031.35
Frontier Post Settings /wp-admin/admin.php?page=frontier_admin_menu1,3002.0227.0831.83
Debug Info /wp-admin/admin.php?page=frontier_post_admin_list_capabilities1,5422.0222.5629.86
Frontier Post Capabilities /wp-admin/admin.php?page=frontier_post_admin_capabilities1,6062.0325.9335.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_frontier-my-approvals
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_frontier-my-posts
    • widget_recent-comments
    • widget_frontier-new-category-posts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: fpost_sc_parms in wp-content/plugins/frontier-post/forms/frontier_post_form_simple.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function frontier_post_output_msg() in wp-content/plugins/frontier-post/forms/frontier_post_form_page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function frontier_post_output_msg() in wp-content/plugins/frontier-post/forms/frontier_post_form_quickpost.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/frontier-post/forms/frontier_post_form_standard.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/frontier-post/include/frontier_new_category_post_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function frontier_post_output_msg() in wp-content/plugins/frontier-post/forms/frontier_post_form_old.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/frontier-post/include/frontier_my_posts_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frontier-post/admin/frontier-post-admin-backup.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function frontier_post_output_msg() in wp-content/plugins/frontier-post/forms/frontier_post_form_preview.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/frontier-post/include/frontier_post_defaults.php:13

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)
There were no browser issues found

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 require attention:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

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

The main PHP file in "Frontier Post" ver. 6.1 adds more information about the plugin and also serves as the entry point for this plugin
109 characters long description:
Simple, Fast & Secure frontend management of posts - Add, Edit, Delete posts from frontend - My Posts Widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected11,745 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PO File122,6093,4395,846
PHP352,1141,1175,464
CSS215438434
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity49.00
▷ Minimum class complexity9.00
▷ Maximum class complexity78.00
Average method complexity13.00
▷ Minimum method complexity1.00
▷ Maximum method complexity47.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%
Functions116
▷ Named functions116100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/comment.png2.11KB1.59KB▼ 24.95%
images/comments.png1.39KB1.28KB▼ 8.40%
include/comments.png0.82KB0.73KB▼ 11.37%
images/edit.png1.77KB1.44KB▼ 18.92%
images/approve.png1.80KB1.45KB▼ 19.48%