94% publish-and-redirect-to-add-new-post

Code Review | Publish And Redirect To Add New Post

WordPress plugin Publish And Redirect To Add New Post scored 94% from 54 tests.

About plugin

  • Plugin page: publish-and-redir...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 5.8.1
  • First release: May 13, 2013
  • Latest release: Sep 13, 2014
  • Number of updates: 17
  • Update frequency: every 28.8 days
  • Top authors: mindstien (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active / 3,508 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼171.40ms] Passed 4 tests

An overview of server-side resources used by Publish And Redirect To Add New Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1240.86 ▲16.35
Dashboard /wp-admin3.06 ▲0.0150.69 ▼5.99
Posts /wp-admin/edit.php3.11 ▲0.0152.63 ▲7.01
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.91 ▼688.35
Media Library /wp-admin/upload.php3.01 ▲0.0039.33 ▲1.75

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Publish And Redirect To Add New Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲13716.02 ▲0.5811.11 ▲1.2853.73 ▲3.33
Dashboard /wp-admin2,976 ▲425.97 ▼0.09148.49 ▼13.05115.19 ▼3.48
Posts /wp-admin/edit.php2,745 ▲62.73 ▲0.0169.09 ▼1.6395.10 ▲4.47
Add New Post /wp-admin/post-new.php1,689 ▲7418.85 ▼2.57397.34 ▲107.12117.72 ▲2.27
Media Library /wp-admin/upload.php1,813 ▲65.04 ▼0.02148.39 ▼10.86127.14 ▼2.15

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
Uninstall script ran successfully

Smoke tests 75% from 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 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/publish-and-redirect-to-add-new-post/publish-and-redirect-to-add-new-post.php:11

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 94% 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 your attention:
  • Screenshots: Please add an image for screenshot #1 (See the three new buttons to help you redirect to add new post.)
The official readme.txt is a good inspiration

publish-and-redirect-to-add-new-post/publish-and-redirect-to-add-new-post.php 92% from 13 tests

Analyzing the main PHP file in "Publish And Redirect To Add New Post" version 1.5
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 276 characters long)

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
Good job! No executable or dangerous file extensions detected61 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16961

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.64KB9.83KB▼ 64.45%