84% trigger-scheduled-events

Code Review | Trigger Scheduled Events

WordPress plugin Trigger Scheduled Events scored84%from 54 tests.

About plugin

  • Plugin page: trigger-scheduled...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Oct 16, 2014
  • Latest release: Oct 16, 2014
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: scottnelle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,197 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼15.92ms] Passed 4 tests

An overview of server-side resources used by Trigger Scheduled Events
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.14 ▼3.34
Dashboard /wp-admin3.32 ▲0.0152.85 ▼1.58
Posts /wp-admin/edit.php3.37 ▲0.0146.85 ▼10.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.89 ▼48.75
Media Library /wp-admin/upload.php3.24 ▲0.0138.49 ▲1.28
Scheduled Events /wp-admin/tools.php?page=trigger_scheduled_event3.2032.05

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Trigger Scheduled Events
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.37 ▼0.021.87 ▼0.2346.23 ▼1.02
Dashboard /wp-admin2,199 ▲225.55 ▼0.05100.56 ▲5.5946.16 ▲6.99
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0236.60 ▼11.1534.73 ▼4.42
Add New Post /wp-admin/post-new.php1,548 ▲1723.27 ▲0.01680.47 ▼7.7156.51 ▼0.73
Media Library /wp-admin/upload.php1,398 ▼24.22 ▼0.01105.65 ▼0.0946.77 ▲0.27
Scheduled Events /wp-admin/tools.php?page=trigger_scheduled_event8232.0527.8427.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trigger-scheduled-events/trigger-scheduled-events.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tested up to: Version not formatted correctly
The official readme.txt might help

trigger-scheduled-events/trigger-scheduled-events.php Passed 13 tests

The entry point to "Trigger Scheduled Events" version 1.0 is a PHP file that has certain tags in its header comment area
102 characters long description:
Trigger any scheduled event now instead of waiting until WP cron tells it to run. Handy for debugging.

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 plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122339

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.47
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin