84% cloudflare-page-cache

Code Review | Cloudflare Page Cache

WordPress plugin Cloudflare Page Cache scored84%from 54 tests.

About plugin

  • Plugin page: cloudflare-page-c...
  • Plugin version: 1.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-5.2
  • WordPress version: 6.3.1
  • First release: Dec 29, 2018
  • Latest release: May 22, 2019
  • Number of updates: 9
  • Update frequency: every 17.1 days
  • Top authors: patmeenan (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /17,918 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.03MB] [CPU: ▼4.95ms] Passed 4 tests

Analyzing server-side resources used by Cloudflare Page Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.19 ▲4.17
Dashboard /wp-admin3.33 ▲0.0346.51 ▼1.89
Posts /wp-admin/edit.php3.38 ▲0.0245.74 ▼2.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.16 ▼13.30
Media Library /wp-admin/upload.php3.25 ▲0.0233.85 ▼2.22

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

Browser metrics Passed 4 tests

Checking browser requirements for Cloudflare Page Cache
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▲0.021.94 ▲0.4243.66 ▲4.61
Dashboard /wp-admin2,195 ▲245.52 ▼0.0283.12 ▼5.8939.26 ▼0.63
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0234.98 ▼0.1233.08 ▼4.86
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▲0.06655.03 ▲44.3559.42 ▲3.64
Media Library /wp-admin/upload.php1,400 ▲64.24 ▲0.0392.62 ▼7.2344.39 ▼2.01

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cloudflare-page-cache/cloudflare-page-cache.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: cache, speed, cloudflare, performance

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

"Cloudflare Page Cache" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
No dangerous file extensions were detected51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151951

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin