84% orders-pro

Code Review | Orders Pro

WordPress plugin Orders Pro scored84%from 54 tests.

About plugin

  • Plugin page: orders-pro
  • Plugin version: 1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Mar 29, 2023
  • Number of updates: 29
  • Update frequency: every 25.9 days
  • Top authors: rezaplus (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /1,049 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.03MB] [CPU: ▼2.91ms] Passed 4 tests

Analyzing server-side resources used by Orders Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.34 ▲0.11
Dashboard /wp-admin3.34 ▲0.0346.48 ▼5.82
Posts /wp-admin/edit.php3.39 ▲0.0347.67 ▲2.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.25 ▼8.63
Media Library /wp-admin/upload.php3.27 ▲0.0335.17 ▲3.10

Server storage [IO: ▲0.09MB] [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: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Orders Pro: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.42 ▲0.131.78 ▲0.1244.25 ▼0.26
Dashboard /wp-admin2,206 ▲265.58 ▼0.0981.51 ▼8.7938.76 ▼4.45
Posts /wp-admin/edit.php2,115 ▲181.99 ▼0.0336.06 ▼0.7533.94 ▼1.79
Add New Post /wp-admin/post-new.php1,607 ▲8122.00 ▼0.94606.44 ▼41.6736.37 ▼27.78
Media Library /wp-admin/upload.php1,408 ▲54.25 ▲0.0497.71 ▲4.4444.87 ▲2.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/orders-pro/functions/OrdersPreview.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/orders-pro/functions/OrdersPreview/PriceColumn.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/orders-pro/functions/Orders.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/orders-pro/pages/Options/OrderPreviewColumns.php:1
    • > PHP Notice
      Undefined variable: OrderPro_Orders_options in wp-content/plugins/orders-pro/pages/Options/Orders.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/orders-pro/functions/OrdersPreview/PriceColumn.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/orders-pro/pages/Options/Orders.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/orders-pro/pages/options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/orders-pro/pages/Options/aboutPremium.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/orders-pro/pages/Options/Orders.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

orders-pro/orders-pro.php 92% from 13 tests

The main PHP file in "Orders Pro" ver. 1.8 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,225 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP129572503
CSS230238
SVG805215
PO File15876147
JavaScript2510122

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods777.78%
▷ Protected methods222.22%
▷ Private methods00.00%
Functions20
▷ Named functions840.00%
▷ Anonymous functions1260.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-20.png3.54KB1.05KB▼ 70.35%