83% anything-order-by-terms

Code Review | Anything Order by Terms

WordPress plugin Anything Order by Terms scored83%from 54 tests.

About plugin

  • Plugin page: anything-order-by...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: May 24, 2016
  • Latest release: Jul 6, 2022
  • Number of updates: 47
  • Update frequency: every 47.5 days
  • Top authors: briarinc (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /14,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.50ms] Passed 4 tests

Analyzing server-side resources used by Anything Order by Terms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.86 ▼1.15
Dashboard /wp-admin3.34 ▲0.0452.25 ▲1.26
Posts /wp-admin/edit.php3.47 ▲0.1142.66 ▼0.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.14 ▼4.39
Media Library /wp-admin/upload.php3.25 ▲0.0333.84 ▼3.73

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Anything Order by Terms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.281.79 ▲0.2243.21 ▲1.36
Dashboard /wp-admin2,206 ▲154.84 ▼0.0399.52 ▼6.0841.49 ▲3.24
Posts /wp-admin/edit.php2,131 ▲452.32 ▲0.2838.17 ▲2.6734.62 ▲0.71
Add New Post /wp-admin/post-new.php1,528 ▼523.39 ▲0.04726.76 ▲92.1855.25 ▲6.88
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.11100.72 ▼5.0443.01 ▼2.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/anything-order-by-terms/modules/base/compatibility.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Anything_Order_Base' not found in wp-content/plugins/anything-order-by-terms/modules/taxonomy/class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Anything_Order_Base' not found in wp-content/plugins/anything-order-by-terms/modules/post/class.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

anything-order-by-terms/anything-order.php 85% from 13 tests

This is the main PHP file of "Anything Order by Terms" version 1.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("anything-order-by-terms.php" instead of "anything-order.php")

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
No dangerous file extensions were detected759 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6144358402
JavaScript1420173
CSS1322128
PO File28856

PHP code Passed 2 tests

This is a very shot 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.43
Average class complexity12.40
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods38
▷ Static methods12.63%
▷ Public methods2052.63%
▷ Protected methods1847.37%
▷ 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
There are no PNG files in this plugin