84% in-category-order

Code Review | In category Order

WordPress plugin In category Order scored84%from 54 tests.

About plugin

  • Plugin page: in-category-order
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.7.0
  • WordPress version: 6.3.1
  • First release: May 13, 2014
  • Latest release: Dec 13, 2016
  • Number of updates: 7
  • Update frequency: every 143.9 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /7,371 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.05ms] Passed 4 tests

An overview of server-side resources used by In category Order
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.75 ▲0.12
Dashboard /wp-admin3.34 ▲0.0445.75 ▼15.63
Posts /wp-admin/edit.php3.39 ▲0.0350.82 ▼1.42
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.15 ▼3.25
Media Library /wp-admin/upload.php3.27 ▲0.0340.93 ▲2.83

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

In category Order: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.321.78 ▼0.0439.46 ▼6.16
Dashboard /wp-admin2,192 ▲185.57 ▼0.0092.49 ▲0.3839.48 ▼1.79
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0339.23 ▲0.5434.40 ▼3.14
Add New Post /wp-admin/post-new.php1,526 ▼223.28 ▲0.23799.23 ▲133.2356.88 ▼10.51
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.02104.98 ▼9.5943.66 ▼4.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/in-category-order/views/in_table_view.php:19
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/in-category-order/views/in_row_view.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/in-category-order/plugin.php:74

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
3 plugin tags: category order, drag n drop order, post order

in-category-order/plugin.php 92% from 13 tests

The main file in "In category Order" v. 0.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("in-category-order.php" instead of "plugin.php")

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

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.00
▷ Minimum class complexity10.00
▷ Maximum class complexity53.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ 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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin