84% pantheon-advanced-page-cache

Code Review | Pantheon Advanced Page Cache

WordPress plugin Pantheon Advanced Page Cache scored84%from 54 tests.

About plugin

  • Plugin page: pantheon-advanced...
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Oct 16, 2023
  • Number of updates: 52
  • Update frequency: every 48.7 days
  • Top authors: danielbachhuber (78.85%)getpantheon (23.08%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /551,250 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.76ms] Passed 4 tests

Server-side resources used by Pantheon Advanced Page Cache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.37 ▼1.05
Dashboard /wp-admin3.37 ▲0.0244.86 ▼10.58
Posts /wp-admin/edit.php3.48 ▲0.1244.65 ▼5.73
Add New Post /wp-admin/post-new.php6.07 ▲0.1882.25 ▼13.68
Media Library /wp-admin/upload.php3.29 ▲0.0636.94 ▲2.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pantheon Advanced Page Cache
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▼0.131.89 ▲0.2646.71 ▲5.14
Dashboard /wp-admin2,195 ▲175.51 ▼0.2486.73 ▼24.6537.81 ▼2.55
Posts /wp-admin/edit.php2,103 ▲61.97 ▼0.0434.97 ▼5.6331.95 ▼3.31
Add New Post /wp-admin/post-new.php1,526 ▼223.02 ▼0.06666.55 ▼5.2251.24 ▲0.69
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.0494.35 ▼1.1841.55 ▼0.93

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
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pantheon-advanced-page-cache/pantheon-advanced-page-cache.php:128

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: cache, cdn, pantheon

pantheon-advanced-page-cache/pantheon-advanced-page-cache.php 92% from 13 tests

The main PHP script in "Pantheon Advanced Page Cache" version 1.4.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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 detected579 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP584487579

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.75
▷ Minimum class complexity6.00
▷ Maximum class complexity52.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods3592.11%
▷ Public methods3592.11%
▷ Protected methods00.00%
▷ Private methods37.89%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG images were found in this plugin