78% insert-post-from-front-end-with-featured-image

Code Review | Insert post from front-end with featured image

WordPress plugin Insert post from front-end with featured image scored78%from 54 tests.

About plugin

  • Plugin page: insert-post-from-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: Jan 28, 2020
  • Number of updates: 13
  • Update frequency: every 78.0 days
  • Top authors: hellomohsinkhan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Insert post from front-end with featured image
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.88 ▲4.74
Dashboard /wp-admin3.36 ▲0.0244.47 ▼16.66
Posts /wp-admin/edit.php3.48 ▲0.1245.37 ▼1.44
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.41 ▼8.40
Media Library /wp-admin/upload.php3.29 ▲0.0632.60 ▼1.01

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Insert post from front-end with featured image
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲13313.70 ▼0.768.35 ▲6.7145.60 ▲7.48
Dashboard /wp-admin2,199 ▲185.53 ▼0.1682.58 ▼16.7536.57 ▼6.49
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0036.80 ▲0.9034.31 ▼10.17
Add New Post /wp-admin/post-new.php1,530 ▼523.21 ▲4.88619.63 ▼8.3743.86 ▼18.90
Media Library /wp-admin/upload.php1,401 ▲14.19 ▲0.0292.07 ▼14.1440.04 ▼5.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/insert-post-from-front-end-with-featured-image/admin/partials/insert_post_from_front_end-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/insert-post-from-front-end-with-featured-image/public/partials/insert_post_from_front_end-public-display.php:3

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: reviews, testimonial, news, comments, custom posts

insert-post-from-front-end-with-featured-image/insert_post_from_front_end.php 85% from 13 tests

"Insert post from front-end with featured image" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("insert-post-from-front-end-with-featured-image.php" instead of "insert_post_from_front_end.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin283 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12118508277
JavaScript25546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity13.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin