74% gator-cache

Code Review | Gator Cache

WordPress plugin Gator Cache scored74%from 54 tests.

About plugin

  • Plugin page: gator-cache
  • Plugin version: 2.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 31, 2014
  • Latest release: Dec 22, 2018
  • Number of updates: 114
  • Update frequency: every 15.7 days
  • Top authors: GatorDog (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

300+ active /35,417 total downloads

Benchmarks

Plugin footprint 65% 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.04MB] [CPU: ▼5.21ms] Passed 4 tests

This is a short check of server-side resources used by Gator Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.97 ▲1.01
Dashboard /wp-admin3.35 ▲0.0553.51 ▼5.26
Posts /wp-admin/edit.php3.41 ▲0.0551.77 ▼0.19
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.24 ▼16.40
Media Library /wp-admin/upload.php3.28 ▲0.0538.09 ▲2.58

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Gator Cache: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.58 ▲0.319.97 ▲5.4746.02 ▲6.31
Dashboard /wp-admin2,238 ▲325.86 ▼0.03100.32 ▼4.1340.38 ▼3.19
Posts /wp-admin/edit.php2,117 ▲172.06 ▲0.0536.23 ▼2.3232.92 ▼0.41
Add New Post /wp-admin/post-new.php1,555 ▲1823.58 ▲0.41666.18 ▼14.1851.64 ▼5.23
Media Library /wp-admin/upload.php1,417 ▲144.24 ▲0.0696.36 ▼7.4346.35 ▼0.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/gator-cache/lib/Config/Lite.php+21
    parse_ini_file(gc-config.ini.php): failed to open stream: No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gator-cache/gator-cache.php:731

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: optimize, multisite, performance, woocommerce, bbpress...

gator-cache/gator-cache.php Passed 13 tests

The principal PHP file in "Gator Cache" v. 2.1.8 is loaded by WordPress automatically on each request
78 characters long description:
A Better, Stronger, Faster WordPress Cache Plugin. Easy to install and manage.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected6,643 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP266852,3975,165
JavaScript6100251,075
CSS31014403

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity57.30
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods325
▷ Static methods11033.85%
▷ Public methods27785.23%
▷ Protected methods4614.15%
▷ Private methods20.62%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants14.00%
▷ Class constants2496.00%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/chosen-sprite.png0.63KB0.88KB0.00%
css/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%