94% wp-inline-cacher

Code Review | WP Inline Cacher

WordPress plugin WP Inline Cacher scored 94% from 54 tests.

About plugin

  • Plugin page: wp-inline-cacher
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Feb 1, 2021
  • Latest release: Feb 1, 2021
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: ChrisBAshton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 111 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.18MB] [CPU: ▼153.32ms] Passed 4 tests

Analyzing server-side resources used by WP Inline Cacher
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▲0.0225.24 ▲4.71
Dashboard /wp-admin2.85 ▼0.2029.29 ▼20.01
Posts /wp-admin/edit.php3.12 ▲0.0148.57 ▲3.88
Add New Post /wp-admin/post-new.php4.98 ▼0.4581.13 ▼583.02
Media Library /wp-admin/upload.php2.93 ▼0.0728.08 ▼14.11

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Inline Cacher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,672 ▲7615.86 ▲0.198.97 ▲0.8349.58 ▼3.54
Dashboard /wp-admin2,960 ▲265.90 ▼0.22139.20 ▼8.17116.71 ▼3.19
Posts /wp-admin/edit.php2,736 ▼32.69 ▼0.0068.24 ▲0.0593.40 ▼5.55
Add New Post /wp-admin/post-new.php1,605 ▲10519.73 ▲1.13379.87 ▲1.65111.93 ▼0.88
Media Library /wp-admin/upload.php1,808 ▼25.03 ▲0.01147.86 ▼4.27126.21 ▲13.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

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
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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-inline-cacher/functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-inline-cacher/functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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
6 plugin tags: fast, performance, speed, service worker, caching...

wp-inline-cacher/wp-inline-cacher.php Passed 13 tests

The primary PHP file in "WP Inline Cacher" version 0.1.0 is used by WordPress to initiate all plugin functionality
89 characters long description:
Speed up your website by automatically inlining your stylesheets for first-time visitors.

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
There were no executable files found in this plugin180 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript298128
PHP452247
Markdown1405

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity3.00
▷ Minimum method complexity3.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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 files were detected