84% simple-save-redirect-button

Code Review | Simple Save Redirect Button

WordPress plugin Simple Save Redirect Button scored84%from 54 tests.

About plugin

  • Plugin page: simple-save-redir...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.7.3
  • WordPress version: 6.3.1
  • First release: May 22, 2017
  • Latest release: May 22, 2017
  • Number of updates: 2
  • Update frequency: every 16.5 days
  • Top authors: longly10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.62ms] Passed 4 tests

An overview of server-side resources used by Simple Save Redirect Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.51 ▼7.07
Dashboard /wp-admin3.38 ▲0.0451.13 ▼17.80
Posts /wp-admin/edit.php3.50 ▲0.1452.83 ▲4.77
Add New Post /wp-admin/post-new.php5.98 ▲0.1098.96 ▲5.24
Media Library /wp-admin/upload.php3.30 ▲0.0834.99 ▼2.38

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simple Save Redirect Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6313.64 ▼0.651.59 ▼0.2441.23 ▼1.14
Dashboard /wp-admin2,230 ▲305.88 ▲0.02121.81 ▲8.4556.17 ▲14.47
Posts /wp-admin/edit.php2,109 ▲122.04 ▼0.0050.35 ▲13.3335.16 ▲1.51
Add New Post /wp-admin/post-new.php1,535 ▼1023.22 ▲0.23611.18 ▼76.0860.79 ▲7.12
Media Library /wp-admin/upload.php1,412 ▲94.20 ▼0.0398.90 ▲0.0143.63 ▼4.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-save-redirect-button/includes/class-simple-save-redirect-actions.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (screenshot-1), #2 (screenshot-2)
The official readme.txt might help

simple-save-redirect-button/simple-save-redirect-button.php 92% from 13 tests

Analyzing the main PHP file in "Simple Save Redirect Button" version 1.0.0
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 268 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin576 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4137302331
CSS121192
JavaScript230686
Sass112067

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity25.67
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods1446.67%
▷ Protected methods00.00%
▷ Private methods1653.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.34KB10.69KB▼ 62.29%
screenshot-2.png23.64KB9.50KB▼ 59.80%