90% on-demand-revalidation

Code Review | On-Demand Revalidation

WordPress plugin On-Demand Revalidation scored 90% from 54 tests.

About plugin

  • Plugin page: on-demand-revalid...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 20, 2022
  • Latest release: Jun 21, 2023
  • Number of updates: 20
  • Update frequency: every 18.5 days
  • Top authors: bebjakub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,708 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.32MB] [CPU: ▼10.03ms] Passed 4 tests

A check of server-side resources used by On-Demand Revalidation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3140.95 ▼11.73
Dashboard /wp-admin3.68 ▲0.3852.98 ▲2.56
Posts /wp-admin/edit.php3.73 ▲0.3750.19 ▼5.84
Add New Post /wp-admin/post-new.php6.17 ▲0.2985.33 ▼25.11
Media Library /wp-admin/upload.php3.52 ▲0.2937.74 ▲3.31
Next.js On-Demand Revalidation /wp-admin/options-general.php?page=on-demand-revalidation3.5238.91

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
on_demand_revalidation_default_settings
can_compress_scripts
on_demand_revalidation_post_update_settings
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for On-Demand Revalidation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲21514.83 ▲0.451.66 ▼0.3037.95 ▼8.98
Dashboard /wp-admin2,364 ▲1766.63 ▲0.81130.40 ▲11.1741.68 ▼8.47
Posts /wp-admin/edit.php2,276 ▲1873.52 ▲1.4850.19 ▲7.3531.25 ▼9.56
Add New Post /wp-admin/post-new.php1,545 ▲1123.20 ▼0.01651.47 ▼35.5937.11 ▼24.96
Media Library /wp-admin/upload.php1,412 ▲304.30 ▲0.1181.34 ▼21.8140.41 ▼2.39
Next.js On-Demand Revalidation /wp-admin/options-general.php?page=on-demand-revalidation1,1253.5846.9027.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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
4 plugin tags: revalidation, nextjs, ssg, on-demand

on-demand-revalidation/on-demand-revalidation.php Passed 13 tests

"On-Demand Revalidation" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
Next.js On-Demand Revalidation on the post update, revalidate specific paths on the post update.

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
Good job! No executable or dangerous file extensions detected1,464 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP153817861,459
JSON1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity26.78
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods98
▷ Static methods3131.63%
▷ Public methods9091.84%
▷ Protected methods00.00%
▷ Private methods88.16%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.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
PNG images were not found in this plugin