89% guest-post

Code Review | Guest Posts

WordPress plugin Guest Posts scored 89% from 54 tests.

About plugin

  • Plugin page: guest-post
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.1
  • WordPress version: 5.8.1
  • First release: Jan 10, 2020
  • Latest release: Oct 16, 2020
  • Number of updates: 5
  • Update frequency: every 748.0 days
  • Top authors: sunilkumarthz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 416 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼138.46ms] Passed 4 tests

Analyzing server-side resources used by Guest Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0840.62 ▲6.88
Dashboard /wp-admin3.11 ▲0.0545.88 ▲0.78
Posts /wp-admin/edit.php3.16 ▲0.0545.18 ▲2.76
Add New Post /wp-admin/post-new.php5.47 ▲0.0390.53 ▼556.74
Media Library /wp-admin/upload.php3.05 ▲0.0531.59 ▼0.63
All Items /wp-admin/edit.php?post_type=guest_post3.0932.03
Add New /wp-admin/post-new.php?post_type=guest_post3.1548.90

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Guest Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,135 ▲53918.30 ▲2.7142.90 ▲33.7751.68 ▲5.20
Dashboard /wp-admin3,005 ▲685.67 ▼0.32152.36 ▲0.13108.14 ▼0.94
Posts /wp-admin/edit.php2,774 ▲352.73 ▲0.0172.96 ▲4.8882.84 ▼6.23
Add New Post /wp-admin/post-new.php1,638 ▲13821.59 ▲2.99295.49 ▼86.06105.55 ▼2.93
Media Library /wp-admin/upload.php1,842 ▲354.81 ▼0.22135.13 ▼27.00118.84 ▼0.03
All Items /wp-admin/edit.php?post_type=guest_post1,4412.6368.2773.33
Add New /wp-admin/post-new.php?post_type=guest_post2,9339.06230.91136.89

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/guest-post/public/init.php
    • > /wp-content/plugins/guest-post/admin/post-types.php
    • > /wp-content/plugins/guest-post/admin/init.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/guest-post/public/posts-list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/guest-post/guest-post.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/guest-post/public/submission-handler.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/guest-post/public/post-form.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
2 plugin tags: custom post type, frontend submission

guest-post/guest-post.php Passed 13 tests

The main PHP script in "Guest Posts" version 1.0.0 is automatically included on every request by WordPress
28 characters long description:
Handle Guest Post Submission

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin400 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP74426251
CSS24676
JavaScript215973

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin