84% default-post-sort

Code Review | Default Post Sort

WordPress plugin Default Post Sort scored84%from 54 tests.

About plugin

  • Plugin page: default-post-sort
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 6.3.1
  • First release: Jun 29, 2019
  • Latest release: Jun 29, 2019
  • Number of updates: 6
  • Update frequency: every 2.8 days
  • Top authors: topher1kenobe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,200 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Default Post Sort
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.88 ▲1.93
Dashboard /wp-admin3.32 ▲0.0144.57 ▼1.34
Posts /wp-admin/edit.php3.37 ▲0.0148.82 ▲0.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.86 ▼18.91
Media Library /wp-admin/upload.php3.24 ▲0.0133.35 ▼0.32

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Default Post Sort
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.19 ▼1.101.93 ▲0.0843.28 ▲0.17
Dashboard /wp-admin2,206 ▲185.80 ▲0.7299.38 ▼4.4335.91 ▼10.84
Posts /wp-admin/edit.php2,089 ▼32.12 ▲0.1339.57 ▲1.9733.92 ▼1.24
Add New Post /wp-admin/post-new.php1,543 ▲2918.54 ▲0.92618.09 ▼70.1367.32 ▲14.28
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0894.16 ▼9.8741.32 ▼1.99

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
  • 3× 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/default-post-sort/dps-action.class.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/default-post-sort/default-post-sort.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/default-post-sort/dps-admin.class.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: orderby

default-post-sort/default-post-sort.php 92% from 13 tests

The main PHP file in "Default Post Sort" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected136 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP338118113
Markdown115023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity7.50
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin