84% johnny-cache

Code Review | Johnny Cache

WordPress plugin Johnny Cache scored84%from 54 tests.

About plugin

  • Plugin page: johnny-cache
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2011
  • Latest release: Jul 30, 2015
  • Number of updates: 10
  • Update frequency: every 140.2 days
  • Top authors: wonderboymusic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,357 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.48ms] Passed 4 tests

Server-side resources used by Johnny Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.23 ▼3.10
Dashboard /wp-admin3.32 ▲0.0246.73 ▼2.50
Posts /wp-admin/edit.php3.37 ▲0.0150.16 ▲1.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.17 ▼6.68
Media Library /wp-admin/upload.php3.24 ▲0.0132.40 ▼1.62

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Johnny Cache
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.32 ▼1.061.54 ▼0.3940.44 ▼9.15
Dashboard /wp-admin2,219 ▲345.00 ▼0.86107.67 ▲2.7243.00 ▲3.71
Posts /wp-admin/edit.php2,108 ▲162.18 ▲0.1340.05 ▼4.6637.68 ▲2.08
Add New Post /wp-admin/post-new.php1,545 ▲3118.48 ▲0.75637.31 ▼45.5063.29 ▲4.42
Media Library /wp-admin/upload.php1,404 ▲194.16 ▼0.0997.90 ▼2.9442.84 ▲2.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/johnny-cache/johnny-cache.php:286

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
8 plugin tags: batcache, memcached, wp object cache, cache, flush cache...

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

The principal PHP file in "Johnny Cache" v. 0.3 is loaded by WordPress automatically on each request
60 characters long description:
UI for managing Batcache / Memcached WP Object Cache backend

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
No dangerous file extensions were detected329 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1398239
JavaScript115183
CSS1107

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.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%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin