84% wp-fragment-cache

Code Review | WP Fragment Cache

WordPress plugin WP Fragment Cache scored 84% from 54 tests.

About plugin

  • Plugin page: wp-fragment-cache
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2014
  • Latest release: Jun 18, 2014
  • Number of updates: 8
  • Update frequency: every 6.8 days
  • Top authors: mariuspass (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

An overview of server-side resources used by WP Fragment Cache
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.56 ▲4.43
Dashboard /wp-admin3.37 ▲0.0648.17 ▼5.51
Posts /wp-admin/edit.php3.48 ▲0.1249.64 ▼3.69
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.01 ▼6.54
Media Library /wp-admin/upload.php3.29 ▲0.0636.60 ▲0.44
WP Fragment Cache /wp-admin/options-general.php?page=wp-fragment-cache3.2629.68

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Fragment Cache
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4413.21 ▼1.551.87 ▼0.1438.91 ▼5.12
Dashboard /wp-admin2,221 ▲335.90 ▼0.00107.65 ▲6.3741.64 ▼10.91
Posts /wp-admin/edit.php2,106 ▲172.02 ▲0.0338.42 ▼3.0036.36 ▲2.47
Add New Post /wp-admin/post-new.php1,561 ▲1918.38 ▲0.11611.61 ▼6.9662.38 ▲1.94
Media Library /wp-admin/upload.php1,403 ▲154.25 ▲0.0399.39 ▲0.5644.47 ▼1.28
WP Fragment Cache /wp-admin/options-general.php?page=wp-fragment-cache8382.0425.6926.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-fragment-cache/admin/views/admin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: cache, fragment cache, performance, caching, cache block...

wp-fragment-cache/wp-fragment-cache.php Passed 13 tests

The entry point to "WP Fragment Cache" version 1.0.4 is a PHP file that has certain tags in its header comment area
65 characters long description:
Boost your page performance by caching individual page fragments.

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 detected377 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6125361377

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity22.00
▷ Minimum class complexity14.00
▷ Maximum class complexity30.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods1040.00%
▷ Public methods1768.00%
▷ Protected methods00.00%
▷ Private methods832.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin