79% order-manager

Code Review | Order Manager

WordPress plugin Order Manager scored79%from 54 tests.

About plugin

  • Plugin page: order-manager
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: Dec 22, 2019
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: dougwollison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /638 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
Install script ran successfully

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

Server-side resources used by Order Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.91 ▲2.12
Dashboard /wp-admin3.31 ▲0.0062.98 ▲7.50
Posts /wp-admin/edit.php3.36 ▲0.0049.90 ▼7.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.28 ▼4.64
Media Library /wp-admin/upload.php3.23 ▲0.0038.74 ▲4.72

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Order Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.081.70 ▼0.1443.93 ▼2.47
Dashboard /wp-admin2,206 ▲184.86 ▼0.13112.74 ▼26.6140.65 ▼10.61
Posts /wp-admin/edit.php2,086 ▼61.97 ▼0.0838.32 ▼5.6135.81 ▼2.90
Add New Post /wp-admin/post-new.php1,519 ▼922.98 ▼0.07647.48 ▼30.6957.70 ▲2.49
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0294.67 ▼3.9840.49 ▼2.41

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/order-manager/uninstall.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Handler' not found in wp-content/plugins/order-manager/includes/class-ordermanager-ajax.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function OrderManager_Autoloader\\plugin_dir_path() in wp-content/plugins/order-manager/includes/autoloader.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/order-manager/includes/abstract-ordermanager-walker.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Walker' not found in wp-content/plugins/order-manager/includes/class-ordermanager-post-walker.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Handler' not found in wp-content/plugins/order-manager/includes/class-ordermanager-documenter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Handler' not found in wp-content/plugins/order-manager/includes/class-ordermanager-system.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Walker' not found in wp-content/plugins/order-manager/includes/class-ordermanager-term-walker.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Handler' not found in wp-content/plugins/order-manager/includes/class-ordermanager-installer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Handler' not found in wp-content/plugins/order-manager/includes/class-ordermanager-manager.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'OrderManager\\Handler' not found in wp-content/plugins/order-manager/includes/class-ordermanager-backend.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: order manager, term order, sort posts, order, sort...

order-manager/order-manager.php Passed 13 tests

The entry point to "Order Manager" version 1.0.0 is a PHP file that has certain tags in its header comment area
39 characters long description:
Adds order controls for posts and terms

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
There were no executable files found in this plugin2,231 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP173001,338938
JavaScript413990721
JSON100518
Sass18053
CSS1011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.93
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes12100.00%
Methods66
▷ Static methods5989.39%
▷ Public methods6395.45%
▷ Protected methods23.03%
▷ Private methods11.52%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected