10% custom-taxonomy-order

Code Review | Custom Taxonomy Order

WordPress plugin Custom Taxonomy Order scored10%from 54 tests.

About plugin

  • Plugin page: custom-taxonomy-o...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 12, 2018
  • Latest release: Feb 15, 2019
  • Number of updates: 6
  • Update frequency: every 18.7 days
  • Top authors: msicknick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,027 total downloads

Benchmarks

Plugin footprint 58% 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
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Custom_Taxonomy_Order::activate() should not be called statically

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.82ms] Passed 4 tests

Server-side resources used by Custom Taxonomy Order
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.81 ▼6.22
Dashboard /wp-admin3.31 ▲0.0049.81 ▼8.27
Posts /wp-admin/edit.php3.36 ▲0.0048.10 ▼3.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.71 ▼13.43
Media Library /wp-admin/upload.php3.23 ▲0.0037.52 ▲3.28

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Custom Taxonomy Order: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.171.78 ▼0.2042.39 ▼4.21
Dashboard /wp-admin2,206 ▲215.91 ▲0.10102.14 ▼6.7140.22 ▼0.71
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0335.59 ▼5.3935.13 ▼4.06
Add New Post /wp-admin/post-new.php1,533 ▼023.13 ▼0.29686.56 ▲74.0553.11 ▼2.48
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.1094.05 ▼11.9241.36 ▼4.58

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/custom-taxonomy-order/includes/custom-taxonomy-order.php:319

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
No tags were found

custom-taxonomy-order/custom-taxonomy-order.php Passed 13 tests

The main file in "Custom Taxonomy Order" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
59 characters long description:
Enanbles drag and drop on taxonomy lists for a custom order

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin255 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP363131222
JavaScript110032
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png6.83KB2.28KB▼ 66.66%