10% advanced-order

Code Review | Advanced Order

WordPress plugin Advanced Order scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-order
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.2
  • WordPress version: 5.8.1
  • First release: Jan 21, 2016
  • Latest release: Feb 22, 2017
  • Number of updates: 27
  • Update frequency: every 14.7 days
  • Top authors: c0ns0l3 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 2,450 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.74MB] [CPU: ▼194.46ms] Passed 4 tests

Analyzing server-side resources used by Advanced Order
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼0.9513.06 ▼23.09
Dashboard /wp-admin1.90 ▼1.156.34 ▼48.29
Posts /wp-admin/edit.php1.91 ▼1.206.68 ▼40.82
Add New Post /wp-admin/post-new.php1.91 ▼3.536.21 ▼656.85
Media Library /wp-admin/upload.php1.91 ▼1.106.24 ▼31.88
Advanced Order /wp-admin/options-general.php?page=advanced-order1.916.32

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Order
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,749 ▲17715.90 ▼0.059.11 ▼2.4147.50 ▲1.34
Dashboard /wp-admin3,040 ▲1066.20 ▲0.07151.25 ▼7.15121.26 ▲0.52
Posts /wp-admin/edit.php2,821 ▲822.92 ▲0.2080.41 ▲6.0097.00 ▲1.71
Add New Post /wp-admin/post-new.php1,954 ▲44415.94 ▼2.68450.17 ▲33.58112.80 ▲8.85
Media Library /wp-admin/upload.php1,878 ▲715.00 ▼0.02155.93 ▲4.34126.96 ▲11.05
Advanced Order /wp-admin/options-general.php?page=advanced-order1,1302.3660.9773.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=advanced-order
    • > User notice in wp-includes/functions.php+5663
    register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/options-general.php?page=advanced-order
    • > Notice in wp-content/plugins/advanced-order/options.php+68
    Undefined variable: _info_update_terms
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=advanced-order
    • > Warning in wp-content/plugins/advanced-order/options.php+68
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/options-general.php?page=advanced-order
    • > Notice in wp-content/plugins/advanced-order/options.php+68
    Undefined variable: _info_update_posts

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/advanced-order/options.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Управляющий елемент сортировки), #2 (Демонстрация настроек)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === advanced-order === )
You can take inspiration from this readme.txt

advanced-order/advanced_order.php 85% from 13 tests

"Advanced Order" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 184 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-order.php" instead of "advanced_order.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin599 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2114218466
JavaScript14390
CSS113043

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2167.74%
▷ Protected methods00.00%
▷ Private methods1032.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin