78% routed-actions

Code Review | Routed Actions

WordPress plugin Routed Actions scored78%from 54 tests.

About plugin

  • Plugin page: routed-actions
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.0
  • WordPress version: 6.3.1
  • First release: Sep 17, 2014
  • Latest release: Sep 17, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Desertsnowman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,062 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.04MB] [CPU: ▼11.51ms] Passed 4 tests

A check of server-side resources used by Routed Actions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.32 ▼1.61
Dashboard /wp-admin3.40 ▲0.0650.81 ▼11.92
Posts /wp-admin/edit.php3.45 ▲0.1050.47 ▲0.10
Add New Post /wp-admin/post-new.php5.53 ▼0.3568.67 ▼32.62
Media Library /wp-admin/upload.php3.32 ▲0.1039.17 ▲4.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Routed Actions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.33 ▼0.894.72 ▲3.0842.99 ▲0.52
Dashboard /wp-admin2,219 ▲314.85 ▼0.0297.35 ▼16.1841.55 ▼1.16
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0239.44 ▲5.1035.07 ▼1.75
Add New Post /wp-admin/post-new.php1,546 ▲2623.09 ▼0.17673.48 ▲8.6749.41 ▲0.16
Media Library /wp-admin/upload.php1,395 ▲134.26 ▼0.04101.82 ▲4.6142.76 ▲1.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/routed-actions/ui/templates/editor/editor-templates.php
    • > /wp-content/plugins/routed-actions/ui/templates/static/action-template.php
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'RACTIONS_PATHui/admin-menus.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/routed-actions/ui/admin.php on line 9
    • > PHP Warning
      include_once(RACTIONS_PATHui/templates/editor/editor-templates.php): failed to open stream: No such file or directory in wp-content/plugins/routed-actions/ui/admin.php on line 22
    • > PHP Warning
      Use of undefined constant RACTIONS_PATH - assumed 'RACTIONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/routed-actions/ui/admin.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/routed-actions/ui/admin-menus.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/routed-actions/ui/admin.php:26
    • > PHP Warning
      Use of undefined constant RACTIONS_PATH - assumed 'RACTIONS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/routed-actions/ui/admin.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/routed-actions/includes/functions-editor.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/routed-actions/ui/templates/editor/editor-templates.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/routed-actions/includes/functions-admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/routed-actions/includes/functions-panels.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (**Admin Page** - Manage current routes.), #2 (**Setting an Action** - setting the action to run and wich arguments to pass in.)
The official readme.txt might help

routed-actions/routed-actions.php Passed 13 tests

This is the main PHP file of "Routed Actions" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
42 characters long description:
Create a url to route to a defined action.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin4,121 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65723562,936
PHP1116885738
CSS33116447

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/icon.png4.43KB0.71KB▼ 84.03%
screenshot-2.png56.33KB17.71KB▼ 68.55%
screenshot-1.png71.27KB22.53KB▼ 68.39%