84% post-terms-order

Code Review | Post Terms Order - per Post based

WordPress plugin Post Terms Order - per Post based scored84%from 54 tests.

About plugin

  • Plugin page: post-terms-order
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2014
  • Latest release: Jul 22, 2022
  • Number of updates: 12
  • Update frequency: every 231.6 days
  • Top authors: nsp-code (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active /37,703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.79ms] Passed 4 tests

Analyzing server-side resources used by Post Terms Order - per Post based
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.95 ▲9.42
Dashboard /wp-admin3.32 ▲0.0243.16 ▼7.31
Posts /wp-admin/edit.php3.37 ▲0.0247.42 ▼9.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.39 ▼9.96
Media Library /wp-admin/upload.php3.25 ▲0.0231.73 ▼0.65
Post Terms Order /wp-admin/options-general.php?page=pto_interface3.2433.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Post Terms Order - per Post based
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7014.84 ▲0.261.67 ▲0.0341.06 ▼1.44
Dashboard /wp-admin2,214 ▲295.86 ▲0.97101.59 ▼10.4378.39 ▲38.95
Posts /wp-admin/edit.php2,097 ▲51.98 ▼0.0239.24 ▼2.9134.19 ▼2.68
Add New Post /wp-admin/post-new.php1,528 ▲1423.02 ▲5.47765.15 ▲66.6561.20 ▲6.13
Media Library /wp-admin/upload.php1,396 ▲84.13 ▼0.04107.16 ▼5.8046.30 ▲1.95
Post Terms Order /wp-admin/options-general.php?page=pto_interface1,1032.0934.8532.46

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/post-terms-order/include/pto_walkers.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-terms-order/include/functions.php:155
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-terms-order/post-terms-order.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif).)
Please take inspiration from this readme.txt

post-terms-order/post-terms-order.php Passed 13 tests

The main PHP file in "Post Terms Order - per Post based" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
Sort Taxonomy Terms per Post based using a Drag and Drop Sortable JavaScript capability

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 detected1,855 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP5370213860
JavaScript4156113725
CSS2252138
PO File24452132

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.25
▷ Minimum class complexity3.00
▷ Maximum class complexity52.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/help.png0.30KB0.32KB0.00%
images/menu-icon.png3.75KB0.93KB▼ 75.20%
images/gray-grad.png0.21KB0.18KB▼ 11.74%