77% user-frontend-post-submit

Code Review | User Frontend Post Submit

WordPress plugin User Frontend Post Submit scored77%from 54 tests.

About plugin

  • Plugin page: user-frontend-pos...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 12, 2015
  • Latest release: Sep 14, 2015
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: templatesplugin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /6,747 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.02MB] [CPU: ▼0.40ms] Passed 4 tests

Analyzing server-side resources used by User Frontend Post Submit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.99 ▲4.17
Dashboard /wp-admin3.32 ▲0.0253.31 ▼1.95
Posts /wp-admin/edit.php3.37 ▲0.0246.19 ▼2.33
Add New Post /wp-admin/post-new.php5.92 ▲0.04110.99 ▲19.54
Media Library /wp-admin/upload.php3.25 ▲0.0235.43 ▼1.49

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for User Frontend Post Submit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.99 ▼0.5613.39 ▲11.6453.70 ▲7.43
Dashboard /wp-admin2,218 ▲385.59 ▼0.0785.56 ▼17.6138.66 ▼10.40
Posts /wp-admin/edit.php2,123 ▲231.98 ▲0.0334.37 ▼0.0534.29 ▼4.76
Add New Post /wp-admin/post-new.php1,546 ▲1322.87 ▼0.34587.06 ▼27.4150.31 ▼8.67
Media Library /wp-admin/upload.php1,426 ▲294.18 ▲0.0199.77 ▼14.7450.50 ▲1.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/user-frontend-post-submit/public/cropper/captcha.php
    • > /wp-content/plugins/user-frontend-post-submit/public/partials/vs-anonymous-post-public-short-code.php
    • > /wp-content/plugins/user-frontend-post-submit/public/partials/captcha.php
    • > /wp-content/plugins/user-frontend-post-submit/public/partials/vs-anonymous-post-public-display.php
    • > /wp-content/plugins/user-frontend-post-submit/public/cropper/captcha-validation.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'ThumbBase' not found in wp-content/plugins/user-frontend-post-submit/public/cropper/phpthumb/gdThumb.inc.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-frontend-post-submit/admin/partials/vs-anonymous-post-admin-display.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PhpThumb' not found in wp-content/plugins/user-frontend-post-submit/public/cropper/phpthumb/thumb_plugins/gd_reflection.inc.php:179
    • > PHP Notice
      Undefined index: vercode in wp-content/plugins/user-frontend-post-submit/public/cropper/captcha-validation.php on line 3
    • > PHP Notice
      Undefined index: captcha in wp-content/plugins/user-frontend-post-submit/public/cropper/captcha-validation.php on line 3
    • > PHP Notice
      Undefined index: vercode in wp-content/plugins/user-frontend-post-submit/public/cropper/captcha-validation.php on line 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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1 , 2 3(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt is a good inspiration

user-frontend-post-submit/vs-anonymous-post.php 85% from 13 tests

The main PHP file in "User Frontend Post Submit" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("user-frontend-post-submit.php" instead of "vs-anonymous-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin12,503 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
CSS746317,632
JavaScript89313613,110
PHP203981,3791,473
SVG100288

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods98
▷ Static methods44.08%
▷ Public methods7576.53%
▷ Protected methods1414.29%
▷ Private methods99.18%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.56MB with 0.37MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshort-1.png175.25KB66.98KB▼ 61.78%
screenshort-3.png370.48KB114.07KB▼ 69.21%
screenshort-2.png30.77KB10.72KB▼ 65.16%