78% wp-fastest-cache

Code Review | WP Fastest Cache

WordPress plugin WP Fastest Cache scored78%from 54 tests.

About plugin

  • Plugin page: wp-fastest-cache
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Aug 4, 2013
  • Latest release: Nov 13, 2023
  • Number of updates: 2,500
  • Update frequency: every 1.3 days
  • Top authors: emrevona (100%)

Code review

54 tests

User reviews

3970 reviews

Install metrics

1,000,000+ active /45,050,301 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.53MB] [CPU: ▲1.43ms] Passed 4 tests

This is a short check of server-side resources used by WP Fastest Cache
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7441.36 ▲2.10
Dashboard /wp-admin3.86 ▲0.5649.08 ▼0.26
Posts /wp-admin/edit.php3.92 ▲0.5555.75 ▲10.40
Add New Post /wp-admin/post-new.php6.40 ▲0.5194.53 ▼1.71
Media Library /wp-admin/upload.php3.73 ▲0.4939.10 ▲5.57

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 162 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

WP Fastest Cache: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,056 ▲29413.47 ▼0.939.30 ▲7.6237.22 ▼8.46
Dashboard /wp-admin2,310 ▲1305.54 ▼0.1092.14 ▼3.3569.13 ▲28.01
Posts /wp-admin/edit.php2,240 ▲1402.00 ▲0.0541.91 ▲4.9235.15 ▼1.16
Add New Post /wp-admin/post-new.php1,809 ▲28322.01 ▼1.20715.44 ▲91.9354.29 ▼3.20
Media Library /wp-admin/upload.php1,524 ▲1214.26 ▲0.07102.58 ▲2.2568.47 ▲27.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-fastest-cache/templates/cdn/exclude_sources.php
    • > /wp-content/plugins/wp-fastest-cache/templates/cdn/file_types.php
    • > /wp-content/plugins/wp-fastest-cache/templates/cdn/cloudflare.php
    • > /wp-content/plugins/wp-fastest-cache/templates/cdn/other.php
    • > /wp-content/plugins/wp-fastest-cache/templates/cdn/specify_sources.php
    • > /wp-content/plugins/wp-fastest-cache/templates/cdn/maxcdn.php
  • 44× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WPFC_MAIN_PATH - assumed 'WPFC_MAIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-fastest-cache/templates/cdn/cloudflare.php on line 85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-fastest-cache/templates/toolbar_settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-fastest-cache/templates/cache_path.php:22
    • > PHP Warning
      include(): Failed opening 'WPFC_MAIN_PATHtemplates/buttons.html' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-fastest-cache/templates/cdn/maxcdn.php on line 73
    • > PHP Warning
      Use of undefined constant WPFC_MAIN_PATH - assumed 'WPFC_MAIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-fastest-cache/templates/cdn/maxcdn.php on line 49
    • > PHP Warning
      include(WPFC_MAIN_PATHtemplates/cdn/exclude_sources.php): failed to open stream: No such file or directory in wp-content/plugins/wp-fastest-cache/templates/cdn/other.php on line 56
    • > PHP Warning
      include(): Failed opening 'WPFC_MAIN_PATHtemplates/cdn/file_types.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-fastest-cache/templates/cdn/other.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-fastest-cache/templates/updatepost.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-fastest-cache/templates/update_success.php:9
    • > PHP Warning
      include(WPFC_MAIN_PATHtemplates/cdn/file_types.php): failed to open stream: No such file or directory in wp-content/plugins/wp-fastest-cache/templates/cdn/maxcdn.php on line 49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: performance, core web vitals, optimize, wp-cache, cache

wp-fastest-cache/wpFastestCache.php 92% from 13 tests

The primary PHP file in "WP Fastest Cache" version 1.2.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-fastest-cache.php" instead of "wpFastestCache.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin21,249 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP352,5781,1969,660
PO File284,1954,4468,693
CSS577181,492
JavaScript9156231,009
HTML8280296
SVG30399

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 135)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity126.79
▷ Minimum class complexity2.00
▷ Maximum class complexity429.00
Average method complexity7.43
▷ Minimum method complexity1.00
▷ Maximum method complexity135.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods274
▷ Static methods5018.25%
▷ Public methods26496.35%
▷ Protected methods82.92%
▷ Private methods20.73%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
23 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-24x24.png1.08KB1.18KB0.00%
images/crown.png1.86KB0.75KB▼ 59.80%
images/label-bg.png8.82KB2.99KB▼ 66.09%
images/stackpath.png2.11KB1.26KB▼ 40.50%
images/icon.png3.35KB2.10KB▼ 37.23%