84% hamecache

Code Review | Hamecache

WordPress plugin Hamecache scored84%from 54 tests.

About plugin

  • Plugin page: hamecache
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.1
  • WordPress version: 6.3.1
  • First release: May 31, 2019
  • Latest release: May 31, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /804 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.22MB] [CPU: ▼2.09ms] Passed 4 tests

This is a short check of server-side resources used by Hamecache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2145.62 ▼2.61
Dashboard /wp-admin3.53 ▲0.2254.47 ▲2.62
Posts /wp-admin/edit.php3.64 ▲0.2853.58 ▲1.92
Add New Post /wp-admin/post-new.php6.12 ▲0.2390.65 ▼10.28
Media Library /wp-admin/upload.php3.45 ▲0.2238.71 ▲3.04
Cache Setting /wp-admin/options-general.php?page=hamecache3.4235.44

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hamecache
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲19213.62 ▼0.6614.49 ▲12.7645.34 ▲3.69
Dashboard /wp-admin2,204 ▲245.59 ▲0.0287.04 ▼2.2542.31 ▼0.83
Posts /wp-admin/edit.php2,106 ▲61.95 ▼0.0639.96 ▲2.5337.51 ▼0.92
Add New Post /wp-admin/post-new.php1,531 ▲523.62 ▲0.39611.65 ▼103.0049.33 ▼0.40
Media Library /wp-admin/upload.php1,406 ▲64.21 ▼0.0094.70 ▼8.1441.83 ▼5.31
Cache Setting /wp-admin/options-general.php?page=hamecache9402.1724.7630.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/hamecache/app/Hametuha/Hamecache/Command.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\Hamecache\\Pattern\\Singleton' not found in wp-content/plugins/hamecache/app/Hametuha/Hamecache/Option.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\Hamecache\\Pattern\\Singleton' not found in wp-content/plugins/hamecache/app/Hametuha/Hamecache/Purger.php:14

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: cloudflare, cache

hamecache/hamecache.php 92% from 13 tests

"Hamecache" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected1,164 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP131384341,007
Sass1130111
JavaScript251044
CSS1111
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity20.86
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods53
▷ Static methods47.55%
▷ Public methods4788.68%
▷ Protected methods47.55%
▷ Private methods23.77%
Functions21
▷ Named functions838.10%
▷ Anonymous functions1361.90%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin