84% use-memcached

Code Review | Use Memcached

WordPress plugin Use Memcached scored 84% from 54 tests.

About plugin

  • Plugin page: use-memcached
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 5.9.2
  • First release: Jan 10, 2020
  • Latest release: Mar 12, 2020
  • Number of updates: 7
  • Update frequency: every 13.9 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 4,649 total downloads

Benchmarks

Plugin footprint 82% from 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.30MB] [CPU: ▼301.85ms] Passed 4 tests

This is a short check of server-side resources used by Use Memcached
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.3558.63 ▼22.02
Dashboard /wp-admin3.70 ▲0.2982.58 ▲48.13
Posts /wp-admin/edit.php3.93 ▲0.2844.45 ▲4.62
Add New Post /wp-admin/post-new.php7.23 ▲0.2595.37 ▼1,206.17
Media Library /wp-admin/upload.php3.65 ▲0.3539.85 ▲16.16
Use Memcached /wp-admin/tools.php?page=use_memcached3.6224.55

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • Illegal file modification detected: 1 file (18.62KB) outside of "wp-content/plugins/use-memcached/" and "wp-content/uploads/"
    • (new file) wp-content/object-cache.php
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Use Memcached: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,980 ▲23816.72 ▲1.499.97 ▲3.042.94 ▲0.84
Dashboard /wp-admin2,939 ▲796.21 ▲0.08119.19 ▼20.10185.52 ▲22.53
Posts /wp-admin/edit.php2,732 ▲413.26 ▲0.02104.12 ▲37.45167.96 ▲21.17
Add New Post /wp-admin/post-new.php1,696 ▲3515.82 ▼0.23420.01 ▼20.05162.06 ▼4.94
Media Library /wp-admin/upload.php1,742 ▲475.69 ▲0.19152.62 ▼4.66218.83 ▼10.30
Use Memcached /wp-admin/tools.php?page=use_memcached1,0032.4554.71162.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/object-cache.php+54
    unlink(wp-content/uploads/use-memcached.enabled): No such file or directory

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/use-memcached/plugin.php on line 32
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/use-memcached/plugin.php on line 31
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/use-memcached/templates/object-cache.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Palasthotel\\WordPress\\UseMemcached\\plugin_dir_url() in wp-content/plugins/use-memcached/plugin.php:63
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/use-memcached/templates/object-cache.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/use-memcached/templates/object-cache.php:148

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: performance, cache

use-memcached/plugin.php 92% from 13 tests

The primary PHP file in "Use Memcached" version 1.0.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("use-memcached.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin1,539 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP173884771,406
JavaScript1131876
PO File1131447
JSON10010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.29
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods100
▷ Static methods55.00%
▷ Public methods9595.00%
▷ Protected methods00.00%
▷ Private methods55.00%
Functions23
▷ Named functions1773.91%
▷ Anonymous functions626.09%
Constants19
▷ Global constants526.32%
▷ Class constants1473.68%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin