10% free-guest-post

Code Review | Free Guest Post

WordPress plugin Free Guest Post scored 10% from 54 tests.

About plugin

  • Plugin page: free-guest-post
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 5.9.2
  • First release: Aug 22, 2013
  • Latest release: Jul 21, 2016
  • Number of updates: 51
  • Update frequency: every 21.0 days
  • Top authors: adamljsorensen11 (82.35%)slick2 (19.61%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 4,192 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/free-guest-post/Model.php+444
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/free-guest-post/Model.php:444
    Stack trace:
    #0 wp-content/plugins/free-guest-post/index.php(564): eSourceGhostWriterPluginModel->activate()
    #1 wp-includes/class-wp-hook.php(307): eSourceGhostWriterPlugin->freeWriterActivate()
    #2 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(474): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(689): do_action()

Server metrics [RAM: ▼0.02MB] [CPU: ▼293.46ms] Passed 4 tests

An overview of server-side resources used by Free Guest Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.49 ▲3.98
Dashboard /wp-admin3.42 ▲0.0037.39 ▼1.04
Posts /wp-admin/edit.php3.65 ▲0.00111.61 ▲69.57
Add New Post /wp-admin/post-new.php6.89 ▼0.0998.06 ▼1,178.64
Media Library /wp-admin/upload.php3.30 ▲0.0028.80 ▲1.86

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 2 new options
New WordPress options
free_writer_activate_redirect
free_writer_plugin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Free Guest Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.75 ▲0.195.84 ▼1.132.20 ▼0.26
Dashboard /wp-admin2,895 ▲416.14 ▲0.03114.82 ▼27.54158.86 ▼54.69
Posts /wp-admin/edit.php2,694 ▼03.23 ▼0.0162.29 ▼2.26138.83 ▼2.89
Add New Post /wp-admin/post-new.php1,690 ▲5821.58 ▼0.83428.51 ▲54.05183.06 ▲31.05
Media Library /wp-admin/upload.php1,698 ▲65.49 ▼0.02143.27 ▼4.78190.17 ▼28.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 2 options
    • free_writer_activate_redirect
    • free_writer_plugin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/free-guest-post/views/author/dashboard.php
    • > /wp-content/plugins/free-guest-post/views/author/requested_changes.php
  • 27× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/free-guest-post/views/author/article_approval.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/free-guest-post/views/author/edit_article.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/free-guest-post/views/author/author_register.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/free-guest-post/views/register.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/free-guest-post/views/article_view.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'eSourceGhostWriterPluginModel' not found in wp-content/plugins/free-guest-post/Author_Model.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/free-guest-post/views/request_post.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/free-guest-post/views/article_list.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/free-guest-post/views/author/article_approval_process.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/free-guest-post/views/approval_blank.php:4

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 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (http://app.freeguestpost.com/wordpress%20plugin/screenshots/screenshot.jpg) image not found
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

free-guest-post/index.php 92% from 13 tests

"Free Guest Post" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("free-guest-post.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
Everything looks great! No dangerous files found in this plugin3,458 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP301,893953,305
CSS1372153

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity25.50
▷ Minimum class complexity3.00
▷ Maximum class complexity65.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/images/1364217655_facebook.png47.28KB0.62KB▼ 98.70%
res/images/1365162681_poke.png0.66KB0.77KB0.00%
res/images/1364217551_google_plus.png48.78KB1.32KB▼ 97.30%
res/images/1364217635_twitter.png47.74KB0.84KB▼ 98.24%