10% term-menu-order

Code Review | Term Menu Order

WordPress plugin Term Menu Order scored10%from 54 tests.

About plugin

  • Plugin page: term-menu-order
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2010
  • Latest release: Jul 5, 2012
  • Number of updates: 29
  • Update frequency: every 19.5 days
  • Top authors: jameslafferty (55.17%)billerickson (48.28%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /21,707 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/term-menu-order/term-menu-order.php+63
    Non-static method NS_TMO_Plugin::get_instance() should not be called statically

Server metrics [RAM: ▼1.91MB] [CPU: ▼57.15ms] Passed 4 tests

Analyzing server-side resources used by Term Menu Order
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.78 ▼37.21
Dashboard /wp-admin2.10 ▼1.216.90 ▼44.28
Posts /wp-admin/edit.php2.10 ▼1.268.27 ▼43.31
Add New Post /wp-admin/post-new.php2.10 ▼3.796.65 ▼103.79
Media Library /wp-admin/upload.php2.10 ▼1.135.64 ▼31.99

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

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

Browser metrics Passed 4 tests

Term Menu Order: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.36 ▲0.011.68 ▼0.1643.11 ▲1.38
Dashboard /wp-admin2,195 ▲155.58 ▼0.0993.50 ▲2.8442.43 ▲0.63
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0138.82 ▼5.2135.82 ▼2.22
Add New Post /wp-admin/post-new.php1,526 ▼222.99 ▼0.27683.83 ▲54.5252.53 ▼12.81
Media Library /wp-admin/upload.php1,400 ▲64.24 ▲0.0696.94 ▼6.3343.42 ▲1.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/term-menu-order/term-menu-order.php+63
    Non-static method NS_TMO_Plugin::get_instance() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/term-menu-order/lib/ns_tmo_plugin.class.php:21

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 ('menu_order' available in Quick Edit.), #2 ('menu_order' available when adding a new term.), #3 ('menu_order' available when editing a term.)
The official readme.txt is a good inspiration

term-menu-order/term-menu-order.php Passed 13 tests

The main PHP file in "Term Menu Order" ver. 0.4 adds more information about the plugin and also serves as the entry point for this plugin
117 characters long description:
Creates a 'menu_order' column to specify term order, allowing theme and plugin developers to sort term by menu order.

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
Success! There were no dangerous files found in this plugin201 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP310133111
JavaScript229290

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.21MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png70.61KB25.68KB▼ 63.63%
screenshot-3.png45.89KB16.38KB▼ 64.31%
screenshot-2.png97.00KB35.68KB▼ 63.21%