72% restaurantops-orders

Code Review | RestaurantOps

WordPress plugin RestaurantOps scored 72% from 54 tests.

About plugin

  • Plugin page: restaurantops-orders
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.0
  • WordPress version: 6.3.1
  • First release: Dec 10, 2017
  • Latest release: Jan 4, 2019
  • Number of updates: 5
  • Update frequency: every 78.0 days
  • Top authors: restaurantops (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by RestaurantOps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.45 ▼7.97
Dashboard /wp-admin3.33 ▲0.0244.88 ▼2.91
Posts /wp-admin/edit.php3.38 ▲0.0248.27 ▲0.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.10 ▼5.23
Media Library /wp-admin/upload.php3.25 ▲0.0235.94 ▼1.81

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for RestaurantOps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲6713.26 ▼1.321.70 ▼0.4540.02 ▼4.52
Dashboard /wp-admin2,233 ▲454.96 ▲0.08110.28 ▲8.5364.94 ▲23.88
Posts /wp-admin/edit.php2,119 ▲302.14 ▲0.1239.15 ▼2.2135.14 ▼0.75
Add New Post /wp-admin/post-new.php1,528 ▼517.50 ▼5.70699.11 ▲41.6755.74 ▼4.51
Media Library /wp-admin/upload.php1,412 ▲244.18 ▼0.01103.05 ▼4.9376.70 ▲32.86
RestaurantOps /wp-admin/menus.php260.440.0914.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/restaurantops-orders/restaurantops.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restaurantops-orders/includes/core.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restaurantops-orders/includes/embed.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restaurantops-orders/includes/menus.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/menus.php
    • > Network (severe)
    wp-admin/menus.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Android Application), #2 (Ordering Widget)
You can look at the official readme.txt

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

The principal PHP file in "RestaurantOps" v. 1.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("restaurantops-orders.php" instead of "restaurantops.php")

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
There were no executable files found in this plugin137 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP53326137

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin