78% wp-frontend-submit

Code Review | WP Frontend Submit

WordPress plugin WP Frontend Submit scored78%from 54 tests.

About plugin

  • Plugin page: wp-frontend-submit
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Apr 1, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: newbiesup (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /6,931 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.87ms] Passed 4 tests

A check of server-side resources used by WP Frontend Submit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1440.07 ▲2.06
Dashboard /wp-admin3.44 ▲0.0946.99 ▼16.98
Posts /wp-admin/edit.php3.55 ▲0.2048.27 ▲1.33
Add New Post /wp-admin/post-new.php6.04 ▲0.1590.21 ▼13.87
Media Library /wp-admin/upload.php3.36 ▲0.1335.06 ▲2.89

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

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

Browser metrics Passed 4 tests

WP Frontend Submit: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.91 ▼0.389.00 ▲7.2338.44 ▼4.47
Dashboard /wp-admin2,213 ▲254.88 ▼0.0397.84 ▼18.4339.07 ▼9.43
Posts /wp-admin/edit.php2,093 ▲52.01 ▲0.0539.67 ▼1.2136.84 ▲2.46
Add New Post /wp-admin/post-new.php1,527 ▼318.61 ▲0.46591.61 ▼41.3550.55 ▼3.43
Media Library /wp-admin/upload.php1,392 ▲14.18 ▲0.0291.92 ▼5.9740.88 ▼1.69

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-frontend-submit/admin/partials/wp-frontend-submit-admin-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-frontend-submit/public/partials/wp-frontend-submit-public-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-frontend-submit === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Frontend submit form), #2 (Plugin settings in Customize)
You can take inspiration from this readme.txt

wp-frontend-submit/wp-frontend-submit.php Passed 13 tests

The main file in "WP Frontend Submit" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
114 characters long description:
Easy to use plugin that enables your visitors and members to submit posts with images from the WordPress frontend.

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 detected1,535 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS210712657
PHP12218591545
JavaScript25122225
PO File14152108

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.26
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2374.19%
▷ Protected methods00.00%
▷ Private methods825.81%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png41.80KB15.07KB▼ 63.95%
screenshot-2.png42.54KB16.01KB▼ 62.37%