77% frontend-posts

Code Review | Frontend Posts

WordPress plugin Frontend Posts scored77%from 54 tests.

About plugin

  • Plugin page: frontend-posts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2018
  • Latest release: Oct 4, 2023
  • Number of updates: 12
  • Update frequency: every 185.4 days
  • Top authors: kadiwala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /862 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼11.52ms] Passed 4 tests

This is a short check of server-side resources used by Frontend Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.64 ▼3.39
Dashboard /wp-admin3.37 ▲0.0352.81 ▼16.83
Posts /wp-admin/edit.php3.49 ▲0.1350.00 ▼7.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0989.10 ▼18.61
Media Library /wp-admin/upload.php3.30 ▲0.0738.29 ▲1.66

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Frontend Posts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.47 ▼1.1911.92 ▲9.7945.61 ▲2.49
Dashboard /wp-admin2,199 ▲255.56 ▲0.0285.74 ▼16.7142.06 ▼2.96
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0035.61 ▼1.5836.04 ▼3.22
Add New Post /wp-admin/post-new.php1,530 ▲423.06 ▼0.11677.20 ▲53.0356.96 ▲8.44
Media Library /wp-admin/upload.php1,398 ▲44.20 ▼0.0199.76 ▼5.8344.01 ▲1.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 | 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/frontend-posts/admin/partials/frontend_posts-admin-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/frontend-posts/public/partials/frontend_posts-public-display.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === frontend-posts === )
  • Screenshots: No descriptions were found for these screenshots #1, #2 in frontend-posts/assets to your readme.txt
  • Donate link: Invalid URI ("www.elsner.com")
The official readme.txt might help

frontend-posts/frontend_posts.php 85% from 13 tests

The main PHP script in "Frontend Posts" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("frontend-posts.php" instead of "frontend_posts.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Good job! No executable or dangerous file extensions detected485 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12164607414
CSS28836
JavaScript3106835

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin