89% update-page-cache

Code Review | Update Page Cache

WordPress plugin Update Page Cache scored89%from 54 tests.

About plugin

  • Plugin page: update-page-cache
  • Plugin version: 0.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 28
  • Update frequency: every 35.3 days
  • Top authors: giuse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,233 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.01MB] [CPU: ▼3.83ms] Passed 4 tests

Analyzing server-side resources used by Update Page Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.01 ▼5.73
Dashboard /wp-admin3.31 ▲0.0148.17 ▼7.10
Posts /wp-admin/edit.php3.36 ▲0.0148.67 ▲1.24
Add New Post /wp-admin/post-new.php5.89 ▲0.01100.56 ▼3.73
Media Library /wp-admin/upload.php3.23 ▲0.0137.70 ▲3.13

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Update Page Cache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲4113.20 ▼1.171.70 ▼0.4643.71 ▼0.46
Dashboard /wp-admin2,218 ▲304.79 ▼1.10102.95 ▼13.5340.05 ▼3.89
Posts /wp-admin/edit.php2,101 ▲122.01 ▼0.0536.37 ▼4.8933.23 ▼2.30
Add New Post /wp-admin/post-new.php1,547 ▲423.35 ▲4.99659.47 ▲11.5858.79 ▼6.72
Media Library /wp-admin/upload.php1,394 ▲64.13 ▼0.0997.86 ▼8.3044.65 ▼0.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "buymeacoffee.com/josem"
  • Screenshots: Add images for these screenshots: #1 (Main settings page), #2 ("Update page cache" button added to single pages, posts and custom posts in the backend)
Please take inspiration from this readme.txt

update-page-cache/update-page-cache.php 92% from 13 tests

The principal PHP file in "Update Page Cache" v. 0.0.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected500 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP61434326
JavaScript210120
CSS10054

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
Functions15
▷ Named functions15100.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
There are no PNG files in this plugin