71% wnokta-nginx-cache

Code Review | wnokta nginx cache

WordPress plugin wnokta nginx cache scored 71% from 54 tests.

About plugin

  • Plugin page: wnokta-nginx-cache
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 3, 2020
  • Latest release: Mar 3, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: wnokta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 397 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.04MB] [CPU: ▲2.35ms] Passed 4 tests

Server-side resources used by wnokta nginx cache
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.53 ▼1.09
Dashboard /wp-admin3.34 ▲0.0354.24 ▲5.07
Posts /wp-admin/edit.php3.39 ▲0.0356.57 ▲6.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.50 ▲2.33
Media Library /wp-admin/upload.php3.26 ▲0.0341.39 ▲3.07
Sunucu Tabanlı Ayarlar /wp-admin/admin.php?page=wnokta_nginx_cache_ayarlar_sayfasi3.2737.04
Wordpress Tabanlı Önbellek Ayarları /wp-admin/admin.php?page=wnokta_nginx_cache_onbellek_ayarlar_menu3.2936.59

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

wnokta nginx cache: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲14713.69 ▲0.396.28 ▲4.5548.34 ▲1.69
Dashboard /wp-admin2,243 ▲375.86 ▲0.99100.38 ▼16.0976.35 ▲29.23
Posts /wp-admin/edit.php2,138 ▲492.08 ▲0.0338.24 ▲2.2935.74 ▲2.82
Add New Post /wp-admin/post-new.php1,558 ▲3823.19 ▼0.16676.77 ▼2.4656.64 ▼3.21
Media Library /wp-admin/upload.php1,431 ▲434.15 ▼0.06102.56 ▼12.5280.98 ▲32.42
Sunucu Tabanlı Ayarlar /wp-admin/admin.php?page=wnokta_nginx_cache_ayarlar_sayfasi8891.7128.5429.62
Wordpress Tabanlı Önbellek Ayarları /wp-admin/admin.php?page=wnokta_nginx_cache_onbellek_ayarlar_menu9151.8624.3128.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wnokta-nginx-cache/public/partials/wnokta_nginx_cache-public-display.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/wnokta-nginx-cache/vendor/matthiasmullie/minify/src/CSS.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wnokta-nginx-cache/admin/partials/wnokta_nginx_cache-admin-onbellek-ayarlar.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/wnokta-nginx-cache/vendor/matthiasmullie/minify/src/JS.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/wnokta-nginx-cache/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/wnokta-nginx-cache/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/wnokta-nginx-cache/vendor/matthiasmullie/path-converter/src/Converter.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wnokta-nginx-cache/admin/partials/wnokta_nginx_cache-admin-ayarlar.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/wnokta-nginx-cache/vendor/matthiasmullie/minify/src/Exceptions/IOException.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/wnokta-nginx-cache/vendor/matthiasmullie/path-converter/src/NoConverter.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wnokta_nginx_cache_onbellek_ayarlar_menu
    • > Network (severe)
    wp-content/plugins/wnokta_nginx_cache/admin/img/wnokta-icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Plugin Name: Please specify the plugin name on the first line ( === wnokta-nginx-cache === )
The official readme.txt is a good inspiration

wnokta-nginx-cache/wnokta_nginx_cache.php 77% from 13 tests

This is the main PHP file of "wnokta nginx cache" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 243 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: The principal plugin file should be the same as the plugin slug ("wnokta-nginx-cache.php" instead of "wnokta_nginx_cache.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,745 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP335982,0422,344
JSON300181
JavaScript2170140
Markdown121038
YAML10031
Dockerfile12011
CSS1040

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.68
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes21
▷ Abstract classes314.29%
▷ Concrete classes1885.71%
▷ Final classes00.00%
Methods145
▷ Static methods64.14%
▷ Public methods9062.07%
▷ Protected methods3423.45%
▷ Private methods2114.48%
Functions15
▷ Named functions426.67%
▷ Anonymous functions1173.33%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/wnokta-icon.png1.06KB1.03KB▼ 3.05%