90% category-custom-post-order

Code Review | Posts Order

WordPress plugin Posts Order scored90%from 54 tests.

About plugin

  • Plugin page: category-custom-p...
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2014
  • Latest release: Jan 26, 2023
  • Number of updates: 42
  • Update frequency: every 73.3 days
  • Top authors: potreb (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /28,426 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.07ms] Passed 4 tests

An overview of server-side resources used by Posts Order
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.55 ▲0.42
Dashboard /wp-admin3.39 ▲0.0850.66 ▼3.38
Posts /wp-admin/edit.php3.44 ▲0.0848.77 ▼4.97
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.75 ▼8.33
Media Library /wp-admin/upload.php3.31 ▲0.0840.76 ▲4.23
Order posts /wp-admin/admin.php?page=sort-page3.2729.25
Posts order /wp-admin/options-general.php?page=posts-order-settings3.2834.24

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
posts_order_upgrade
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Posts Order
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.56 ▲0.301.73 ▼0.1944.19 ▲4.16
Dashboard /wp-admin2,192 ▲155.70 ▲0.0582.86 ▼8.8038.53 ▼5.04
Posts /wp-admin/edit.php2,104 ▲12.17 ▲0.2034.12 ▼3.9433.46 ▼4.46
Add New Post /wp-admin/post-new.php1,542 ▲1423.09 ▲0.13597.72 ▼76.6234.29 ▼15.39
Media Library /wp-admin/upload.php1,397 ▼34.17 ▲0.00102.67 ▼3.6070.85 ▲23.46
Order posts /wp-admin/admin.php?page=sort-page7591.7727.0124.61
Posts order /wp-admin/options-general.php?page=posts-order-settings9381.7925.9128.74

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 detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • posts_order_upgrade
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: post order, taxonomy post order, order posts by category, category post order, custom post order...

category-custom-post-order/category-custom-post-order.php 92% from 13 tests

The entry point to "Posts Order" version 1.5.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected694 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3111194585
PO File1414989
JavaScript12020

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.37
Average class complexity46.00
▷ Minimum class complexity11.00
▷ Maximum class complexity81.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2790.00%
▷ Protected methods26.67%
▷ Private methods13.33%
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

PNG files should be compressed to save space and 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
screenshot-1.png13.39KB9.04KB▼ 32.47%