84% nginx-champuru

Code Review | Nginx Cache Controller

WordPress plugin Nginx Cache Controller scored 84% from 54 tests.

About plugin

  • Plugin page: nginx-champuru
  • Plugin version: 3.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2011
  • Latest release: Nov 22, 2022
  • Number of updates: 67
  • Update frequency: every 60.5 days
  • Top authors: miyauchi (80.6%)wokamoto (20.9%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active / 192,956 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Nginx Cache Controller
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0547.00 ▲1.21
Dashboard /wp-admin3.35 ▲0.0451.78 ▼7.14
Posts /wp-admin/edit.php3.40 ▲0.0454.61 ▲3.35
Add New Post /wp-admin/post-new.php5.93 ▲0.04111.92 ▲21.98
Media Library /wp-admin/upload.php3.27 ▲0.0441.65 ▲2.56

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: 1 new table, 7 new options
New tables
wp_nginxchampuru
New WordPress options
widget_recent-posts
can_compress_scripts
nginxchampuru-db_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Nginx Cache Controller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2513.29 ▲0.131.81 ▲0.0443.20 ▼5.15
Dashboard /wp-admin2,214 ▲85.80 ▲0.92106.95 ▼5.4542.20 ▼0.16
Posts /wp-admin/edit.php2,103 ▲172.05 ▲0.0240.08 ▲4.4235.65 ▲1.88
Add New Post /wp-admin/post-new.php1,542 ▲923.45 ▲0.01636.21 ▼169.5347.90 ▼14.59
Media Library /wp-admin/upload.php1,402 ▲114.19 ▼0.05100.99 ▼1.0144.38 ▼2.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • nginxchampuru-db_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nginx-champuru/includes/admin_panel.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/nginx-champuru/includes/wp-cli.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nginx-champuru/nginx-champuru.php:80
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/nginx-champuru/nginx-champuru.php on line 76

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: cache, reverse proxy, nginx

nginx-champuru/nginx-champuru.php 92% from 13 tests

Analyzing the main PHP file in "Nginx Cache Controller" version 3.3.4
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin1,719 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP8185541,172
JavaScript44645225
PO File26076142
CSS341377
Sass112070
JSON10022
SVG10011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.17
▷ Minimum class complexity7.00
▷ Maximum class complexity59.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods76
▷ Static methods45.26%
▷ Public methods5876.32%
▷ Protected methods00.00%
▷ Private methods1823.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/amimoto.png16.27KB8.03KB▼ 50.64%