83% nutsforpress-sort-any-posts

Code Review | NutsForPress Sort Any Post

WordPress plugin NutsForPress Sort Any Post scored 83% from 54 tests.

About plugin

  • Plugin page: nutsforpress-sort...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Oct 5, 2022
  • Latest release: Aug 4, 2023
  • Number of updates: 7
  • Update frequency: every 43.6 days
  • Top authors: Christian Gatti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 559 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▲0.65ms] Passed 4 tests

Analyzing server-side resources used by NutsForPress Sort Any Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.75 ▲2.97
Dashboard /wp-admin3.43 ▲0.1350.58 ▼3.86
Posts /wp-admin/edit.php3.54 ▲0.1950.74 ▲3.41
Add New Post /wp-admin/post-new.php6.03 ▲0.1499.27 ▲1.17
Media Library /wp-admin/upload.php3.35 ▲0.1235.56 ▲2.32
Sort Any Posts /wp-admin/admin.php?page=nfpsap-settings3.3434.89
NutsForPress /wp-admin/admin.php?page=nfproot-settings3.3233.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for NutsForPress Sort Any Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲12613.31 ▼1.114.77 ▲3.0943.76 ▲3.74
Dashboard /wp-admin2,245 ▲574.95 ▲0.04108.04 ▲2.8341.82 ▲0.23
Posts /wp-admin/edit.php2,125 ▲572.09 ▲0.0640.70 ▲4.1335.98 ▲3.63
Add New Post /wp-admin/post-new.php1,545 ▲317.64 ▼0.60587.50 ▼46.9849.91 ▼2.35
Media Library /wp-admin/upload.php1,427 ▲394.23 ▼0.0693.37 ▼16.1942.85 ▼4.28
Sort Any Posts /wp-admin/admin.php?page=nfpsap-settings8392.1025.3727.34
NutsForPress /wp-admin/admin.php?page=nfproot-settings8092.0924.4825.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 13× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/nutsforpress-sort-any-posts/includes/nfpsap-plugin-uninstall.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/root/nfproot-styles-and-scripts.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/admin/includes/nfpsap-admin-sort.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/admin/nfpsap-settings-content.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/root/nfproot-settings-structure.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/public/includes/nfpsap-public-sort.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/root/nfproot-saved-settings.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/admin/nfpsap-settings.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/includes/nfpsap-plugin-activate.php
    • > /wp-content/plugins/nutsforpress-sort-any-posts/root/nfproot-save-settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

nutsforpress-sort-any-posts/nuts-for-press-sort-any-posts.php 85% from 13 tests

The principal PHP file in "NutsForPress Sort Any Post" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nutsforpress-sort-any-posts.php" instead of "nuts-for-press-sort-any-posts.php")
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,307 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP137951861,059
JavaScript29750136
CSS1291112

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions31
▷ Named functions2993.55%
▷ Anonymous functions26.45%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin