84% posts

Code Review | Post Next

WordPress plugin Post Next scored84%from 54 tests.

About plugin

  • Plugin page: posts
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.5
  • WordPress version: 6.3.1
  • First release: Oct 19, 2014
  • Latest release: Mar 20, 2018
  • Number of updates: 30
  • Update frequency: every 61.8 days
  • Top authors: umarbajwa (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /8,910 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.32ms] Passed 4 tests

Analyzing server-side resources used by Post Next
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.05 ▼8.36
Dashboard /wp-admin3.31 ▲0.0145.26 ▼2.48
Posts /wp-admin/edit.php3.36 ▲0.0144.91 ▲2.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.42 ▲0.21
Media Library /wp-admin/upload.php3.24 ▲0.0135.52 ▲1.34

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Post Next
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲13013.97 ▼0.258.22 ▲6.1941.19 ▼6.59
Dashboard /wp-admin2,221 ▲364.88 ▼1.02108.95 ▼8.9241.21 ▼2.79
Posts /wp-admin/edit.php2,110 ▲212.02 ▲0.0140.43 ▲4.1334.86 ▼2.55
Add New Post /wp-admin/post-new.php1,528 ▲917.74 ▼5.53642.57 ▼68.4358.23 ▲3.17
Media Library /wp-admin/upload.php1,406 ▲154.24 ▲0.0895.68 ▼3.6544.88 ▲2.58

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/posts/themes/theme_3.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/posts/includes.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/posts/themes/theme_1.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts/next-post.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/posts/themes/theme_2.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/posts/admin/admin_menu_nxt_post_options_add.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/posts/themes/theme_4.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts/admin/admin_menu_nxt_post.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts/scripts/nxt_post_scripts_styles.php:3

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 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (59 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

posts/next-post.php 92% from 13 tests

This is the main PHP file of "Post Next" version 2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("posts.php" instead of "next-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin511 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1017042451
PO File1111241
JavaScript119019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin