100% batcache

Code Review | Batcache

WordPress plugin Batcache scored 100% from 54 tests.

About plugin

  • Plugin page: batcache
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.3.2
  • WordPress version: 5.8.1
  • First release: Jun 20, 2008
  • Latest release: Mar 28, 2020
  • Number of updates: 66
  • Update frequency: every 65.1 days
  • Top authors: andy (71.21%)vnsavage (16.67%)westi (4.55%)barry (4.55%)automattic (3.03%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 90,925 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼136.45ms] Passed 4 tests

Server-side resources used by Batcache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0140.85 ▲7.04
Dashboard /wp-admin3.07 ▲0.0151.63 ▲5.99
Posts /wp-admin/edit.php3.12 ▲0.0149.90 ▲7.53
Add New Post /wp-admin/post-new.php5.42 ▼0.0194.43 ▼559.90
Media Library /wp-admin/upload.php3.01 ▲0.0133.56 ▲1.08

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Batcache
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.21 ▲0.787.23 ▼3.1447.93 ▼0.62
Dashboard /wp-admin2,973 ▲395.89 ▼0.26137.53 ▼15.45119.30 ▲3.59
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0070.94 ▲5.2792.53 ▼7.62
Add New Post /wp-admin/post-new.php3,636 ▲1,95314.93 ▼3.81447.83 ▲63.61104.81 ▼7.17
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.05151.84 ▲2.48111.95 ▼12.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: performance, memcached, speed, memcache, cache...

batcache/batcache.php Passed 13 tests

The main PHP script in "Batcache" version 1.5 is automatically included on every request by WordPress
39 characters long description:
This optional plugin improves Batcache.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected442 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212191442

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin