78% wp-order-by

Code Review | WP Order By

WordPress plugin WP Order By scored78%from 54 tests.

About plugin

  • Plugin page: wp-order-by
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.5
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Apr 28, 2016
  • Number of updates: 77
  • Update frequency: every 2.4 days
  • Top authors: weiluri (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /4,556 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.91ms] Passed 4 tests

Analyzing server-side resources used by WP Order By
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.21 ▼3.33
Dashboard /wp-admin3.42 ▲0.1149.33 ▲0.44
Posts /wp-admin/edit.php3.53 ▲0.1752.31 ▲1.54
Add New Post /wp-admin/post-new.php6.00 ▲0.11101.34 ▼1.45
Media Library /wp-admin/upload.php3.34 ▲0.1139.87 ▲0.72
Order By /wp-admin/edit.php?page=wpob-settings-post3.3337.12
Order By /wp-admin/edit.php?post_type=attachment&page=wpob-settings-attachment3.3337.37
Order By /wp-admin/edit.php?post_type=page&page=wpob-settings-page3.3332.93
WP Order By Settings /wp-admin/options-general.php?page=wpob-settings-wpob_general3.3339.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Order By
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.24 ▼0.111.64 ▲0.0142.26 ▲0.38
Dashboard /wp-admin2,210 ▲365.63 ▲0.0788.08 ▼5.0843.20 ▲0.53
Posts /wp-admin/edit.php2,115 ▲122.00 ▲0.0242.84 ▲1.2735.22 ▼5.75
Add New Post /wp-admin/post-new.php1,535 ▲923.34 ▲0.28611.40 ▼80.0660.66 ▲2.89
Media Library /wp-admin/upload.php1,409 ▲64.17 ▲0.01101.55 ▼0.0247.39 ▼1.19
Order By /wp-admin/edit.php?page=wpob-settings-post1,0211.6924.8734.67
Order By /wp-admin/edit.php?post_type=attachment&page=wpob-settings-attachment1,0131.6828.2333.35
Order By /wp-admin/edit.php?post_type=page&page=wpob-settings-page1,0211.6925.7330.61
WP Order By Settings /wp-admin/options-general.php?page=wpob-settings-wpob_general1,0181.6925.1232.13

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-order-by/wp-order-by.php
  • 50× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-order-by/views/form_elements.php on line 14
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wp-order-by/views/form_elements.php on line 35
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wp-order-by/views/form_elements.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-order-by/views/form_elements.php on line 30
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wp-order-by/views/form_elements.php on line 4
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wp-order-by/views/form_elements.php on line 30
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wp-order-by/views/form_elements.php on line 25
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-order-by/views/form_elements.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-order-by/views/form_elements.php:51
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wp-order-by/views/form_elements.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-order-by/wp-order-by.php Passed 13 tests

The primary PHP file in "WP Order By" version 1.4.2 is used by WordPress to initiate all plugin functionality
54 characters long description:
A wordpress post, post types and pages ordering plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected563 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP410068461
JavaScript1141174
CSS11028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods521.74%
▷ Public methods1669.57%
▷ Protected methods00.00%
▷ Private methods730.43%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin