10% wp-post-frontend

Code Review | N-Media Post Front-end Form

WordPress plugin N-Media Post Front-end Form scored10%from 54 tests.

About plugin

  • Plugin page: wp-post-frontend
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Nov 6, 2014
  • Latest release: Mar 14, 2021
  • Number of updates: 11
  • Update frequency: every 210.9 days
  • Top authors: nmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,407 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-post-frontend/classes/plugin.class.php+36
    Trying to access array offset on value of type null

Server metrics [RAM: ▼1.78MB] [CPU: ▼49.45ms] Passed 4 tests

This is a short check of server-side resources used by N-Media Post Front-end Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.35 ▼35.00
Dashboard /wp-admin2.23 ▼1.077.66 ▼37.84
Posts /wp-admin/edit.php2.23 ▼1.137.61 ▼38.99
Add New Post /wp-admin/post-new.php2.23 ▼3.667.68 ▼85.95
Media Library /wp-admin/upload.php2.23 ▼1.008.53 ▼24.32

Server storage [IO: ▲0.20MB] [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: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

N-Media Post Front-end Form: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6514.47 ▲0.081.79 ▲0.1439.63 ▼4.20
Dashboard /wp-admin2,214 ▲235.86 ▲0.7799.85 ▼9.6079.10 ▲39.95
Posts /wp-admin/edit.php2,103 ▲112.00 ▼0.0532.67 ▼8.3932.35 ▼5.01
Add New Post /wp-admin/post-new.php1,531 ▼218.23 ▼4.92752.32 ▲82.9076.32 ▲14.36
Media Library /wp-admin/upload.php1,396 ▲84.21 ▼0.04105.66 ▼6.2067.45 ▲21.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wp-post-frontend/classes/plugin.class.php+36
    array_map(): Expected parameter 2 to be an array, bool given
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: custom post, frontend form, user post, edit, post front...

wp-post-frontend/index.php 85% from 13 tests

The main PHP file in "N-Media Post Front-end Form" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-post-frontend.php" instead of "index.php")

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
There were no executable files found in this plugin2,706 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP105473721,298
CSS445541,214
JavaScript29649194

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity53.00
▷ Minimum class complexity28.00
▷ Maximum class complexity74.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/ui/css/smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
js/ui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
js/ui/css/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
images/delete_32.png4.37KB1.43KB▼ 67.31%
images/down_32.png4.15KB1.42KB▼ 65.73%