84% smart-prev-next

Code Review | Smart Prev Next

WordPress plugin Smart Prev Next scored84%from 54 tests.

About plugin

  • Plugin page: smart-prev-next
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2021
  • Latest release: Apr 17, 2023
  • Number of updates: 12
  • Update frequency: every 63.3 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by Smart Prev Next
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.63 ▼5.30
Dashboard /wp-admin3.37 ▲0.0248.70 ▼13.26
Posts /wp-admin/edit.php3.42 ▲0.0647.71 ▲3.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.49 ▼12.92
Media Library /wp-admin/upload.php3.29 ▲0.0635.78 ▼0.16

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Smart Prev Next
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.22 ▼1.581.78 ▼0.1341.34 ▼2.08
Dashboard /wp-admin2,206 ▲154.82 ▼0.08111.29 ▲8.8840.75 ▲3.23
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0539.52 ▲4.6736.34 ▲0.74
Add New Post /wp-admin/post-new.php1,533 ▲1023.06 ▲0.03678.29 ▲45.9257.47 ▲3.61
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0194.98 ▼12.4242.30 ▼0.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 items
  • 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/smart-prev-next/smart-prev-next.php:28

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: admin editor prev next

smart-prev-next/smart-prev-next.php Passed 13 tests

"Smart Prev Next" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
84 characters long description:
Adds smart previous/next buttons to the editor, supports both Classic and Gutenberg!

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 plugin294 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP283114291
CSS1003

PHP code Passed 2 tests

A short review of 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.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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.22MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png133.48KB45.17KB▼ 66.16%
assets/screenshot-1.png89.65KB31.18KB▼ 65.22%