84% buttons-to-edit-next-previous-post

Code Review | Buttons to Edit Next/Previous Post

WordPress plugin Buttons to Edit Next/Previous Post scored84%from 54 tests.

About plugin

  • Plugin page: buttons-to-edit-n...
  • Plugin version: 1.2
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Jul 2, 2022
  • Number of updates: 10
  • Update frequency: every 120.2 days
  • Top authors: aftabmuni (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /8,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

A check of server-side resources used by Buttons to Edit Next/Previous Post
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.56 ▲0.66
Dashboard /wp-admin3.31 ▲0.0144.79 ▲0.64
Posts /wp-admin/edit.php3.36 ▲0.0146.74 ▼1.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.57 ▼60.80
Media Library /wp-admin/upload.php3.23 ▲0.0134.08 ▼0.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Buttons to Edit Next/Previous Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.15 ▼1.394.28 ▲2.3340.34 ▲0.07
Dashboard /wp-admin2,206 ▲184.88 ▼0.14109.42 ▼8.9137.72 ▼8.81
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0136.02 ▲0.3231.90 ▼0.11
Add New Post /wp-admin/post-new.php1,534 ▼823.44 ▲5.23633.84 ▲4.6251.44 ▼12.11
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0595.54 ▼5.2944.12 ▼1.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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)
Even though no errors were found, this is by no means 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/buttons-to-edit-next-previous-post/edit-next-previous-post-admin.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 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: edit-post page add new button, edit next previous post button in admin

buttons-to-edit-next-previous-post/edit-next-previous-post-admin.php 85% from 13 tests

The main PHP script in "Buttons to Edit Next/Previous Post" version 1.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("buttons-to-edit-next-previous-post.php" instead of "edit-next-previous-post-admin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected57 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172257

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin