84% nginx-cache

Code Review | Nginx Cache

WordPress plugin Nginx Cache scored 84% from 54 tests.

About plugin

  • Plugin page: nginx-cache
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.6
  • WordPress version: 6.3.1
  • First release: Nov 20, 2014
  • Latest release: Nov 22, 2020
  • Number of updates: 32
  • Update frequency: every 68.6 days
  • Top authors: tillkruess (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active / 149,713 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.79ms] Passed 4 tests

Server-side resources used by Nginx Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.12 ▼3.09
Dashboard /wp-admin3.33 ▲0.0246.51 ▼1.33
Posts /wp-admin/edit.php3.38 ▲0.0248.40 ▲2.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.84 ▼5.84
Media Library /wp-admin/upload.php3.25 ▲0.0235.84 ▼0.88
Nginx Cache /wp-admin/tools.php?page=nginx-cache3.2632.25

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Nginx Cache
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲6813.11 ▼0.531.83 ▼2.7937.53 ▼6.08
Dashboard /wp-admin2,227 ▲184.88 ▼1.0098.61 ▲0.1439.40 ▼0.27
Posts /wp-admin/edit.php2,107 ▲181.99 ▼0.0639.58 ▲4.6734.93 ▲0.85
Add New Post /wp-admin/post-new.php1,532 ▼1323.25 ▼0.00680.89 ▲43.5660.87 ▲0.20
Media Library /wp-admin/upload.php1,403 ▲124.22 ▲0.03107.44 ▲11.0046.40 ▲1.34
Nginx Cache /wp-admin/tools.php?page=nginx-cache8282.0627.3732.70

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nginx-cache/includes/settings-page.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt might help

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

"Nginx Cache" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
110 characters long description:
Purge the Nginx cache (FastCGI, Proxy, uWSGI) automatically when content changes or manually within WordPress.

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 detected248 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP210529221
CSS14027

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin